RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"when player walk on a part speed and when is not touch to not have speed"
-- local script local part = script.Parent local player = game.Players.LocalPlayer local speed = 30 local function onTouch(otherPart) if otherPart.Parent == player.Character then player.Character.Humanoid.WalkSpeed = speed end end local function onLeave(otherPart) if otherPart.Parent == player.Character then player.Character.Humanoid.WalkSpeed = 16 end end part.Touched:Connect(onTouch) part.TouchEnded:Connect(onLeave)