I want to be able to get the orientation of the CurrentCamera
through a LocalScript and this is what I have tried:
local camOrientation
while true do
camOrientation = game.Workspace.CurrentCamera.CFrame:ToOrientation()
print(camOrientation.X..", "..camOrientation.Y..", "..camOrientation.Z)
task.wait()
end
It gives me this error:
12:59:07.605 StarterPlayer.StarterPlayerScripts.Test:5: attempt to index number with 'X' - Client - Test:5
Stack Begin
12:59:07.606 Script 'StarterPlayer.StarterPlayerScripts.Test', Line 5 - Studio - Test:5
Stack End
What do I do? I think I’ve formatted it right. The docs say that CFrame:ToOrientation returns a Vector3. Thanks in advance!
Edit: This is in Game/StarterPlayer/StarterPlayerScripts