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 change the CurrentCamera's CFrame?

So I want the player's camera to go left so the player appears on the right when he click a button, I have made this script, but it's not working, and gives no error,

local Cam = game.Workspace.CurrentCamera
Cam.CFrame = Cam.CFrame + Vector3.new(0,0,4)

It's also in a LocalScript.

1 comment

0

Make sure to set the CameraType to Scriptable first.

1 answer

✓ Accepted answer

So first, you would have to make the Current camera scriptable:

Cam.CameraType = Enum.CameraType.Scriptable

Then, you would probably still have an error due to you vector. I think this is how you fix the second line of code:

Cam.CFrame = Cam.CFrame + CFrame.new(0,0,4)

Hope this helps

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