Is there a way to get Camera Vector3?

Hello devs, I am working on Camera looking at spot script and I am wondering, is there a way to get Cameras Vector3?

Thank you for answer!

1 Like

You can get the X,Y,Z coordinates of a CFrame.

local CameraCFrame = workspace.Camera.CFrame
Vector3.new(CameraCFrame.X,CameraCFrame.Y,CameraCFrame.Z)
workspace.CurrentCamera.CFrame.Position
1 Like

What does

mean?

He wants to know how to get the Vector3 position of a Camera, instead of it’s CFrame.

Cant you just replace the CFrame with Vector3?

Position is a property of the CFrame datatype. Instance.CFrame.Position will return the Instances position.

4 Likes

The camera position cannot be assigned according to output