players = game.Players
player = game.Players.LocalPlayer
character = player.Character
hum = character.Humanoid
cam = game.Workspace.CurrentCamera
function PlayerSetup()
while true do
hum.WalkSpeed = 0
wait(.01)
end
end
players.PlayerAdded:connect(PlayerSetup)
COMMUNITY QUESTION
How do I lock the Character and camera so that it will stop moving?
1 answer
You could always just anchor the Torso, then make the Camera's CameraType 'Scriptable'.
Here's a quick edit of your code with that added in:
players = game.Players
player = game.Players.LocalPlayer
character = player.Character
hum = character.Humanoid
cam = game.Workspace.CurrentCamera
function PlayerSetup()
while true do
Character.Torso.Anchored = true
cam.CameraType = "Scriptable"
wait()
end
end
players.PlayerAdded:connect(PlayerSetup)
And there you go, that's it.
If you have any further problems/questions, please leave a comment below, and I'll see what I can do. Hope I helped :P
This discussion is preserved as it was. New answers, comments, and votes are closed.

7 comments
should i do this in a local script
Yes. And make sure it's a decendent of the Player in some way.
should i put into the starter pack
I would put it into StarterGui
also theres now an issue when i use the A and D keys the movement comes back
scratch that. When i right click the movmemnt comeback
The camera movement, or the player movement?