Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is it possible to prevent a player from moving/walking?

Asked by 10 years ago

I was wondering, is it possible make a player unable to move for a period of time, then release them?

game.Workspace.??Player??.Torso.Anchored = true

1 answer

Log in to vote
2
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
10 years ago

If you anchor their torso, then it will effectively stop them from moving.

As well as setting their walkspeed to 0, putting bodyvelocity on them, removing the walking script.. etc..

Lots of ways(:

--------------------------Edit1

c = game.Players:GetChildren() --Get all the children of players
for i = 1,#c do
    c[i].Character.Torso.Anchored  = true
end
wait(timehere) --Put the amount of time you want to hold them here
for i = 1,#c do
    c[i].Character.Torso.Anchored = false
end

-Goulstem

0
example? NinjoOnline 1146 — 10y
0
I have editted my question with something, but I dont know how to get all the players in workspace and their torsos. NinjoOnline 1146 — 10y
0
Oh, ok. Edit. Goulstem 8144 — 10y
Ad

Answer this question