Can't figure out how to set Current Camera of local player

  1. What do you want to achieve? Keep it simple and clear!
    I’d like to make a menu screen for my newest game, which is a work in progress. This game is for fun, and soon, I hope to publish it among all.

  2. What is the issue? Include screenshots / videos if possible!
    Unfortunately, my menu screen involves setting the current camera of a player LOCALLY, which I don’t know how to do. I’d like to know how to set a current camera on client side so I know how to do my menu screen!

  3. What solutions have you tried so far? Did you look for solutions on the Creator Hub?
    I’ve searched toolbox for references, I didn’t find any.

Any valuable info would greatly be appriciated! :slight_smile:

Well, localscripts are for the client side so you can just set the camera position in localscripts.

But maybe your problem is more complex than this?

I probably should have mentioned that for me it likes to complain that the CFrame I’d like to set it to doesn’t exist somehow, if it were just a CFrame value or a CFrame attribute of a part. Had this problem multiple times in other games

Additionally, how would I prevent the player from doing anything when I set the camera, so no interference with the menu screen?

You mean as in it prints out an error when getting a CFrame from some part or when creating one? or as in it doesn’t set the CFrame properly?

It does either one depending on how I tried to solve the issue, whether it was using a CFrame value and it wasn’t setting it properly (i.e. doing nothing) or trying to set it to a part’s CFrame, which would error

you can set the camera’s type to Scriptable, so that the player can move it. If that’s what you mean

But what I’m looking for is a non-movable camera set to a certain position without any player interference

That is what the Scriptable cameramode is for, in that state the player can’t move the camera around, and it will stay in its set CFrame, its useful for menu screens, cutscenes, etc. and you can set the cameratyoe back to the default one after.

In this case i’m guessing you forgot to set the camera type to Scriptable since you said it didn’t error, it probably did change its CFrame but only for a fraction of a second before recalculating the player’s camera movement automatically back to a natural position. To avoid that just set the camera to Scriptable mode.

As for that, i’m not really sure since i don’t know how you tried to do it, you probably tried to access the part before it loaded on the clients part and it errored? that could be a reason and it is easily fixed by using :WaitForChild("PartNameHere") so that it waits till it finds it.

Other methods are just switching workspace’s current camera to another camera that you have created in studio for example, but it would still need to have its camera mode set to Scriptable so it is static.

Even when I did that, it still couldn’t find the part, even
though it was clear inside of the workspace, which is very confusing.

could you share the error in the output? (if any)

I have no errors, since this is a new game baseplate I’ve recently created today, I haven’t tested it out. But I know from recent incidents this HAS happened before, and it’s incredibly annoying.

Like you’ve suggested here, I’ll try to do what you’ve told me I can do to probably solve it.
I’ll give you any errors after.

After giving it 1 test, I have recieved 1 error:

Screenshot 2025-08-23 224049

Here is the code:

-- Player Variables
local players = game.Players
local localplayer = players.LocalPlayer
local playercframe = localplayer.Character.HumanoidRootPart.CFrame
local camera = game.Workspace.CurrentCamera
local camcframe = script.CamCFrame

-- Other variables
local label = script.Parent.MenuTitle
local module = require(game.ReplicatedStorage.CameraShaker)

-- Init
camera.CameraType = "scriptable"
camera.CFrame = camcframe.Value

It should be “Scriptable” with an uppercase S, you could also use Enum.CameraType.Scriptable because it provides autocompletion, but it’s just preference, both ways can be used as far as I know.

Pay attention to IntelliSense as you access properties, they give hints on the expected data type.

In your situation, you are setting the CameraType property to a type string instead of Enum.CameraType

-- Init
camera.CameraType = Enum.CameraType.Scriptable -- fix
camera.CFrame = camcframe.Value