This script is supposed to give a speed boost whenever someone touches a giver that I made. Can someone tell me why it's not working?
local SpeedBoost = script.Parent
local function touched (part)
local parent = part.Parent
if game.Players:GetPlayerFromCharacter(parent)then
parent.Humanoid.Walkspeed = 21
end
end
SpeedBoost.Touched:connect(touched)

2 comments
thank you. It works, but do you know how to make it that it only gives the boost the first time you touch it?
Change line 06: "parent.Humanoid.Walkspeed = (whatever speed you want to set it to, maybe experiment)"