I want to give the player that is holding the gear (that is used in this script) some cash right after line 1. The script is in a part, not inside a tool, so I am not sure how I go about this.
script.Parent.Touched:Connect(function(Hit)
if Hit.Parent.Name == 'Hamburger' then
Hit.Parent:Destroy()
script.Parent.Ding:Play()
script.Parent.Parent.PlatedBurger.Transparency = 0
wait(6)
script.Parent.Parent.PlatedBurger.Transparency = 1
end
end)
If you can help, thank you!

3 comments
Where's your attempt? I can only see a touch detect script, but no attempt on adding the money
LMAOOO
I deleted my attempt, because I put something completely wrong. What I did looked a little something like this on Line 3: player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + 5 (I defined Player at the top as player = game.Players.LocalPlayer