Does anyone know how to make a script in which point is to give me +1 speed only once so when player dies they give +1 again?

Hello, point is to give me +1 speed only once so when player dies they give +1 again

Script:
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild(“Humanoid”) ~= nil then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
player.leaderstats.Speed.Value = player.leaderstats.Speed.Value + 1
script.Sound:Play()
script.Disabled = true
end
end)

1 Like

Didnt you already make a post about this? Sigh, well you can use The humanoid event Called .Died which you can use to enable the script again. Learn more at Humanoid.Died

OR, you can use something called Debounce. Heres an article explaining it Debounce – When and Why