Currently, I’m working on a script that tweens the player’s camera. It will activate from wherever the player’s camera currently is. However, I’m wondering if there is a way to save where the player’s camera WAS and revert the player’s camera back to where it was.
I could, of course, make it so the camera goes back to where it was using the tween, but the camera only activates when an event occurs. I also want the camera to reverse when an event occurs, which is why I want to try to save the current camera position.
Is it possible to save the current position of the camera?
Yeah sorry, my bad. Do local positionBeforeTween = game.Workspace.CurrentCamera.CFrame.Position
Thats for the position. If you want the cframe after then you would do CFrame.new(positionBeforeTween)
It doesn’t error, thankfully; however, it still moves the camera to 0, 0, 0.
I wrote a line to print out what the variable positionBeforeTween is. Here what it says:
My guess is that the first three numbers are for the camera position and the last six are for orientation. I still don’t understand why it’s going to 0, 0, 0, though. Strange.