Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to check for a tool before executing a script?

Asked by 5 years ago

I want to make a crafting system in a game by the player clicking on a part and it removes one item and gives you another. But how do I check that a tool is in the players backpack and then execute the script?

1 answer

Log in to vote
0
Answered by
sydre 229 Moderation Voter
5 years ago

For i,v in pairs(player.BackPack:GetChildren()) do if v:IsA("Tool") then print("The loop just looped through a tool") end end

Ad

Answer this question