Stop Camera Motion and Movement from Player

  1. What do you want to achieve? I want to freeze the player in a position. And their camera.

  2. What is the issue? I don’t really know how to.

  3. What solutions have you tried so far? I did a little bit of looking on the Developer Hub and got to this…

local controls = require(game:GetService("Players").LocalPlayer.PlayerScripts.PlayerModule):GetControls() controls:Disable()

That disables the controls, but I have no idea where to put it. I am assuming ServerScriptService. And I am clueless on how to freeze the camera angle.

Thank you!

1 Like

You could put that in any LocalScript client-sided, and to freeze the camera just set the CameraType to Scriptable.

:grin:

You would not put this in ServerScriptService. You would put this as a LocalScript. Remember that the server cannot and should not handle user input.

Using relative path:

-- Assuming this is a local script in playerscripts
local controls = require(script.Parent:WaitForChild("PlayerModule")):GetControls()
controls:Disable()

as for the freezing the camera, I have never done that, so that is as far as I can go for this question.

1 Like

Would you have to script the camera angle to a certain position? I would like the camera to be able to move from different angles.
For instance,


to
image

Any ideas on how to move the angles?

1 Like

To freeze the camera in it’s current orientation, I believe setting the camera’s CameraType to Scriptable should work. At that point, you can offset the camera’s existing CFrame using something like…

camera.CFrame = camera.CFrame * CFrame.Angles(math.rad(45), 0, 0) --in degrees

Hope it helps.

1 Like

Okay, but when you set the camera to scriptable, it freezes the studio camera too. I tried scripting it so that when the server starts is automatically sets the camera to scriptable…
script.Parent.Camera.Camera.CameraType = Scriptable
But that doesn’t work.

1 Like

Set it to Scriptable client-sided, you don’t want to set the camera server-sided.

1 Like

oh yea oops

2 Likes