ViewportFrame does NOT save CurrentCamera Property after leaving

I have the Camera instance inside of the ViewportFrame, I don’t see a reason for it not to save my CurrentCamera when the Camera itself is inside the ViewportFrame instance itself.

This has been an issue for super long and quite annoying to deal with when trying to change the Camera properties manually and having the ViewportFrame not updating unless you remember to re-add the CurrentCamera property.

This only happens when exiting Roblox Studio and I believe it has something to do with it not saving the property in the file and instead keeping the last render of the Viewport contents.

Roblox please fix.

EDIT:
I also notice that Roblox refuses to keep the camera from StarterGui when replicated for PlayerGui and I’ve had trouble creating a camera that remains and idk why.

2 Likes

This is just an acknowledgment announcement!

We’ve filed a ticket into our internal database for this issue, and will come back as soon as we have updates!

Thanks for flagging!

The issue is that Cameras flat out do not save properly. This is why Cameras for ViewportFrames must be created by a script, because the camera created before running the game is deleted.

I think it has to do with some weird behavior from back-in-the day, a fix to a bug that’s (probably) long gone, yet has stuck around to become boilerplate for developers.

1 Like

Cameras, in old clients, used to save correctly too. Is this an issue with the binary format, or have they flat out changed the serializer to disallow saving cameras

1 Like

You’d be way better off to use cameras created from script not from object explorer and save in a table the values you’d need.

1 Like

Cameras do save, they just don’t replicate to the client for whatever reason.

No, they do not save, “CurrentCamera” property resets for viewport frames when openning the file or game in studio.

I meant that Camera objects you create in studio do save and will continue to be accessible on the server, but they won’t be visible to the client. I didn’t mean the ViewportFrame property.