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

Checking for a shovel a tool?

Asked by 6 years ago
script.Parent.Touched:connect(function(part)
    if part.Parent:IsA("Tool") and game.Players:FindFirstChild(part.Parent.Parent.Name) then
    if game.StarterPack.Shovle = true then
        local plr = game.Players:findFirstChild(part.Parent.Parent.Name)
        wait(1)
        plr.leaderstats.Sand.Value = plr.leaderstats.Sand.Value + 1000
        script.Parent:Destroy()
    end
end)

Trying it to check that the player has a shovel equipted so it gives them 1000 sand. I can't seem to get it to work

0
It appears you misspelled shovel, maybe see if it works if you correct that? CryptoBloodXaos 13 — 6y

Answer this question