[Solved] Camera deleting on play?

What I want to achieve
I want to have multiple cameras for things like UI, LoadingScreen, etc. so that I can use designated cameras for designated tasks. Right now I am trying to build a simple camera for a LoadingScreen that I can switch to and then use for the player, and then switch it back to the original camera.

The Issue
The camera deletes where ever I put it. I have put it under workspace under a folder and when I played the game, it was just deleted. My questions are:

  • Where can I put the camera for it to work?
  • Is there a camera mode I need to switch to?
  • Do I need to use the camera roblox provides?
  • If so, had can I make my own camera and overwrite theirs, and also how can I make theirs scriptable but after a period of time change it to the original roblox player camera?

Solutions I have tried
I have tried to put it in workspace under a folder. I need to script it on the client, so I can’t put it in server storage. I tried to put it in replicated first, but unfortunately, it had the same problem.

1 Like

You may want to use CFrame and move the main camera for that.
Making multiple Cameras i think would be an issue or more bothersome to use.

I also created a Loading screen where it uses the Camera. I’ve simply put it into Scriptable and used CFrame to position it.

If you’d like anymore help just ask.

But where can you put cameras where they don’t delete? How can you reset the main camera after you are done scripting it?

I don’t think you can add multiple Cameras into workspace since they are also used for Viewport Frames.
And when you want to switch the Player’s Camera back switch it into Custom.

1 Like

You can reset the main camera by calling :Destroy() on it, after which a new camera will be created with the default properties.

If you don’t want to wait for a new one, you just have to set its type to “Custom” and the subject has to be the character’s humanoid.

You could replace Cameras with CFrameValue instances if you only want to store camera locations. As far as I tried, Cameras can only be placed into SurfaceGuis and I believe ReplicatedFirst, but they are too bothersome to manually operate. All cameras within Workspace will be removed when CurrentCamera is set.

1 Like

Ontop of that. I’d use a Part and positon it in Studio. Set Transparency to 1 and that.
Set the CurrentCamera Mode to Scriptable, Set the Camera’s CFrame to that Parts CFrame.
and when done with, Set it to Custom again.

1 Like

What would be easier is to set it to Attach, make the part its subject and set the CFrame to the part’s CFrame. It will then continue following the part’s location.

2 Likes

Thanks for the information @nooneisback @Snoopy1333!

1 Like