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)
local SpeedBoost = script.Parent local function touched (part) local parent = part.Parent if game.Players:GetPlayerFromCharacter(parent)then parent.Humanoid.Walkspeed = parent.Humanoid.Walkspeed + [amount to boost each time] end end SpeedBoost.Touched:connect(touched)
If that doesn't work check if any errors are returned in the output.