What do you want to achieve? I want to freeze the player in a position. And their camera.
What is the issue? I don’t really know how to.
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.
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.
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…
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.