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

How would I disable player movement control?

Asked by 7 years ago

Simply; I am trying to make it so only the player can move (Humanoid) via scripts instead of him allowed movement by keyboard.

So I've tried disabling the ControlScript in PlayerScripts but it did not work.

So far everything I've done has not worked.

I'd appreciate it for anyone here to help me how to properly do this.

2 answers

Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

Permanent

make a new LocalScript in StarterPlayerScripts and name it exactly "ControlScript" it will replace the old one and there wont be any moving at all

Temporary

if you only want it temporary, you have to disable the ControlScript here (click this)

i assume you was disabling the one in starterplayerscripts after you press play on studio.

script i used to move my character with control script disabled

game.Workspace.Player1.Humanoid.WalkToPoint = Vector3.new(30,30,30)

and the script to disable control script in games

game.Players.LocalPlayer.PlayerScripts.ControlScript.Disabled = true
0
Yes I did that but using :MoveTo() on the humanoid no longer worked when disabling it. Zefeated 70 — 7y
0
you did which one? both? RobloxianDestory 262 — 7y
0
I do not need to do it permanently; I only need player movement to be disabled (via keybaord) so I can use :MoveTo() on the player so they cannot interupt movement. Zefeated 70 — 7y
0
i disabled the controls and i typed this script (gonna post it in on an edit) in the command bar in studio and it still moved me RobloxianDestory 262 — 7y
Ad
Log in to vote
0
Answered by 7 years ago

You could try anchoring the player, I don't recommend this way but it's pretty easy to do.

player = game.Players["playernamehere"].Character:GetChildren()

for i = 1,#z do
player[i].Anchored = true
wait()
end

Answer this question