hey so im making a game and there is a speed boost that is supposed to speed you up then like 20 seconds later make you go your normal speed,
im very new to scripting and i dont know how to make it do that with the script i set up,
i tried serching youtube for tutorials but i cant find anything on how i can make it like i need to
heres the script:
debounce = true
function onTouched(hit)
local h = hit.Parent:findFirstChild(“Humanoid”)
if (h ~= nil and debounce == true) then
debounce = false
h.WalkSpeed = 50
wait(1)
debounce = true
end
end
script.Parent.Touched:connect(onTouched)