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

Anyway to disable player movement?

Asked by
Zerio920 285 Moderation Voter
8 years ago

I've tried moving/destroying the controllers with game:GetService('ControllerService'):ClearAllChildren() (in a localscript of course) but it doesn't seem to work. I can't anchor the character since I still want them to be moving, I just don't want the player to control it. I could always clone the character and use a dummy, but that seems a little messy. I just need to stop the player from controlling their character for a period of time, and then allow them to move afterwards.

Any help would be appreciated. Thanks.

1 answer

Log in to vote
1
Answered by 8 years ago

Sadly the controller service no longer works. So the best way to stop movement of the player is to set their walkspeed and maxslope to 0. This can be like so:

Character.Humanoid.WalkSpeed = 0

Character.Humanoid.MaxSlope = 0

But in your case you want them to also move. So the best method of doing this is to go into Starterscripts, and move the control script from there into playergui. This allows you to disable and enable it as you please

0
I couldn't move the controlscript, so I instead disabled it from playerscripts. Thanks for informing me. Zerio920 285 — 8y
Ad

Answer this question