Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make the camera go to a certain position/point?

I have tried this:

game.Workspace.Camera.CameraType = ("Scriptable");
game.Workspace.Camera.CoordinateFrame = CFrame.new(-413.876099, -67.1133957, 15.660181, 0.447752953, -0.813180864, 0.371825784, -0, 0.415839374, 0.909438133, -0.89415741, -0.407203615, 0.186193272);

Is this correct? It yields no effects.

I use :

print(game.Workspace.CurrentCamera.CoordinateFrame); 

to get the coordinate/point of this camera position however it doesn't seem to change to that position?

1 answer

✓ Accepted answer

Your problem is that you're trying to change the camera by accessing the Camera child of workspace. You need to access the CurrentCamera. - As this is the actual object that controls the client's camera.

Things to note ~ You can only edit the CurrentCamera from the client, e.g. a localscript.

local cam = workspace.CurrentCamera
local pos = CFrame.new(-413.876099, -67.1133957, 15.660181, 0.447752953, -0.813180864, 0.371825784, -0, 0.415839374, 0.909438133, -0.89415741, -0.407203615, 0.186193272)

cam.CameraType = ("Scriptable")
cam.CoordinateFrame = pos

1 comment

0

It's still not setting it. I don't know why!

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