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

How can I make a script for making the player and camera not move at all?

I have tried

Player.Movement = false

and

lockCamera = true

1 comment

0

they dont work

2 answers

✓ Accepted answer

Inside of StarterCharacterScripts (local script): This disables movement of the player

local player = game.Players.LocalPlayer
local character = player.Character
local humanoid = character.Humanoid
Humanoid.WalkSpeed = 0

To lock the camera, you can put a local script in StarterPlayerScripts under StarterPlayer and put:

local cameraHeight = 12
local cameraZOffset = 20
 
local camera = game.Workspace.CurrentCamera
local player = game.Players.LocalPlayer
 
local function setupCamera()
	camera.CFrame = CFrame.new(Vector3.new(0,cameraHeight,cameraZOffset), Vector3.new(0,cameraHeight,0))
end
setupCamera()
player.CharacterAdded:Connect(setupCamera)

To 'freeze' the player you can put the following local script in StarterCharacterScripts:

game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 0

Don't forget to accept the answer if I helped!

2 comments

1

Your player freezing method works but your camera lock method does not. Thanks for the help!

0

No problem! Happy to help!

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