RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"a coin the if you collect you will run faster"
-- script for coin local part = script.Parent local function onTouched(otherPart) local player = game.Players:FindFirstChild(otherPart.Parent.Name) if player then local character = player.Character local humanoid = character:FindFirstChild("Humanoid") if humanoid then part.Parent = nil humanoid.WalkSpeed = humanoid.WalkSpeed + 10 wait(3) humanoid.WalkSpeed = humanoid.WalkSpeed - 10 part.Parent = game.Workspace part.Position = Vector3.new(math.random(-100, 100), part.Position.Y, math.random(-100, 100)) end end end part.Touched:Connect(onTouched)