Camera is bugged

"Camera switching back to the character is bugged on slower devices or in large games with many scripts and players.

The issue is that there’s only one script manipulating the camera in the game, yet I’m still having problems with it.

Changing the CameraType to Custom works only about 50% of the time—same goes for setting the CFrame to a custom point.

I don’t have studio opened but there is something wrong with the camera…

-- Sometimes works, sometimes doesn't
local camera: Camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Custom
1 Like

Does it have to be executed at a specific time?? Help

If you are doing it immediately after the player joins, the core scripts override them when they load

A hacky way on the top of my head is to use a while loop to keep changing it to Custom until it works :alien:

Tried that already hahah and other stuff. It changes in the properties but visually its still stuck

1 Like

Ohh I understand, and how can I prevent that?

1 Like

Are you trying to set it to a specific CFrame or to a character?

You can make a retry system, try setting the CameraType to Custom back to back until it’s Custom. If it never stops though, it’s something else than players core scripts loading.

Both, but it bugs out I dont think its the thing I am doing it immediately… I think the game lag might cause the scripts to mess up

It does show up as Custom and the target is humanoid but the camera is stuck in the middle of nowhere hahah

1 Like

Does the player reset before you set the camera to custom - maybe that’s breaking it?

Also why are you setting the CameraType to custom immediately after the player joins? It’s already Custom by default.

And try also printing stuff like the camera and the CameraType, you most likely should understand why it happens, or show us at least lol.

No I am setting it to scriptable :))
and later on PivotTo(part: BasePart)

Yeah it’s probably the game tbh, when the game has many localscripts, then the camera doesnt wanna listen to me :smiling_face_with_tear: Even if the camera is showing Custom and target is my Humanoid it bugs out and stays in the middle of nowhere