RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"When player touch a part will have speed and when will not touch will noi have speed"
-- local script local part = script.Parent local player = game.Players.LocalPlayer local speed = 50 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)