Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you make players move at different speeds?{Solved}

I want to learn how to make people move at different speeds like in Flee The Facility, where one player is faster than others. I've tried to search it up, but all of the tutorials I've seen so far lead me to change the default speed of all the players.

is there a way that I can have a part when touched speeds up the player?

Solved: Use Avia's method or Dinoz method in the comments.

6 comments

0

I dont feel like you've sufficiently researched this before asking your question. You could find 100 free models that change a players speed by touch.

0

boi free models are dangerous and can infect your game with like millions of children

0

Use a blank place and check the script. Duh.

0

using a free model is no fun

0

I didnt say you had to use it. Learn from it.

0

You are right, Dinoz. I just checked and and saw a bunch of models that I'm now using mixed with Avia's answer! Happy, I used your words of warning and made that the free models won't destroy my game. Thank you both for your comments!

3 answers

✓ Accepted answer

That's simple, You could've figured it out yourself, I will give you the script anyways

game.Players.LocalPlayer.Character.Humanoid.Walkspeed = 0 --Changes the speed of a player to 0

MAKE SURE TO USE A LOCAL SCRIPT

If you need more help just tell me in the comments.

If the answer was helpful please upvote it and mark it as correct.

Good luck with your game!

5 comments

0

So wholesome, I don't think I've ever had someone wish me luck! I would upvote your answer, but I don't have enough reputation.

0

I fail to see how that would help, I mean if it's a local script, Sure! Else you have a problem.

0

Wait The local player is causing an error. Anyway that I could fix this

0

You would need to use a local script, Sorry I forgot to mention that.

0

kk thanks!

In a script do

Cooldown = --what you want your cooldown to be
Lasting = --how long you want it to last
Speed = --how fast you want the player to go
db = false --debounce
part = script.Parent
part.Touched:Connect(function(hit)
	if db == false then
		db = true
		plr = hit.Parent
		ctr = plr.Character or plr.CharacterAdded:Wait()
		hum = ctr:WaitForChild("Humanoid")
		hum.WalkSpeed = Speed
		Wait(Lasting)
		hum.WalkSpeed = 16 --or your game default speed
		Wait(Cooldown)
		db = false
	end
end

hit is what touched the part make sure the script is inside of the part that gives you speed or if you want it so that it turns to normal speed when it touches again do

Speed = --how fast you want the player to go
run = false --debounce
part = script.Parent
part.Touched:Connect(function(hit)
	if run == false then
		run = true
		plr = hit.Parent
		ctr = plr.Character or plr.CharacterAdded:Wait()
		hum = ctr:WaitForChild("Humanoid")
		hum.WalkSpeed = Speed
		else
		run = false
		plr = hit.Parent
		ctr = plr.Character or plr.CharacterAdded:Wait()
		hum = ctr:WaitForChild("Humanoid")
		hum.WalkSpeed = 16 --or your own normal speed
	end
end

Make a brick then insert a script into it.

script.Parent.Touch:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent:FindFirstChild("Humanoid").Walkspeed = 25
end)

When you step on the brick your speed will change.

Then if you want to change the speed back to normal again. Make a brick then insert a script into it.

script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent:FindFirstChild("Humanoid").WalkSpeed = 16
end
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.