Наилучшим способом, если вы знаете имя инструмента, было бы попробовать и FindFirstChild
, а затем проверить результат в операторе if.
Код для выполнения чего-то подобного очень прост, как показано ниже:
local player = game.Players.MaxLi
--You can change how you get to the player as you need
if player.Backpack:FindFirstChild("Tool name goes here") then
print("Tool exists")
--Put the code you want to run if they have the tool here
end
Надеюсь, это поможет вам.