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

Change Humanoid to tool?

Asked by 6 years ago

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?

0
What do you mean? BlackOrange3343 2676 — 6y
0
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. ootheboss 32 — 6y

Answer this question