I'm trying to make a game so that when you step on a hat it gives you RAP I tried this script it works in studio but not in-game is there any way to fix this
function onTouched(hit)
local player = game.Players.LocalPlayer
player.leaderstats.RAP.Value=player.leaderstats.RAP.Value+90
script.Parent:Destroy()
end
script.Parent.Touched:connect(onTouched)

1 comment
Thanks it works now (: