Hello! I made a script for when players touch the brick its in they get a speed boost, Could you help me fix it? Heres the script:
local speedBoost = script.Parent
local function SteppedOn (part)
local parent = part.Parent
if game.Players: GetPlayerFromCharacter(parent) then
parent.Humanoid.WalkSpeek = 160
wait (200)
parent.Humanoid.Walkspeed = 160
end
end
speedBoost.Touched:connect(steppedOn)

1 comment
remove lines 5 and 6