I've tried to change this script:
script.Parent.Touched:connect(function(part)
if game.Players:findFirstChild(part.Parent.Name) then
local plr = game.Players:findFirstChild(part.Parent.Name)
plr.leaderstats.Sand.Value = plr.leaderstats.Sand.Value + 1
end
end)
local debounce = true
script.Parent.Touched:connect(function(part)
if debounce then
debounce = false
if game.Players:findFirstChild(part.Parent.Name) then
local plr = game.Players:findFirstChild(part.Parent.Name)
plr.leaderstats.Sand.Value = plr.leaderstats.Sand.Value
+1
script.Parent:destroy()
end
end
end)
from touching a humanoid to touching a tool. Is there any way to do it?

2 comments
What do you mean?
the script parent is a part that gives you 1 sand when you player touches it. I want it to give me 1 sand if a tool touches it.