Camera won't spin along with CameraSubject Part

I am making a relative simple main menu and am trying to make the camera spin along with the camerapart so that the sky spins slowly in the background behind the start button.

I set the CameraSubject to the camera part and it faces the sky, but the camera doesn’t spin along with it. It’s in the correct position but just isn’t spinning, and the spinner does work, and the part also spins along with the spinner. (WeldConstraint)

image
image

Looking at the documentation, I think that setting the camera subject is pointless if you set the CameraType to scriptable. I’m not too sure about this though.
In the documentation, the different CameraTypes and their descriptions are provided. Maybe a CameraType other than scriptable is what you are looking for?


Looking at this documentation, it seems that maybe follow or attach will give you what you are looking for.

When I do follow or attach, it doesn’t actually make the CameraSubject my camerapart anymore, why is this? And how could I fix it?
(The Camerapart is normally facing the sky in some random spot)

You need to update the camera’s CFrame in a loop for it to work.

1 Like

I thought of this, I’ll try it. I didn’t know if there was a simpler way of doing it, so that’s why I asked.

1 Like

Isn’t it simpler to just use a different cameratype rather than constantly updating the CFrame?

I don’t really know much about camera types but a loop could definitely work.

This might seem weird, but can you try this?

repeat wait() camera.CameraSubject = brick until camera.CameraSubject == brick

I saw this used to fix a script from an old tutorial on camera parts

image
Something weird happened.

The camerasubject is the part, but it no longer facing the front in 1st person with a locked camera.
I’m trying a few ways right now.

I believe follow keeps the object visible on the screen in a third person view. Try using attach.

Still is being weird and attaching the camera in 3rd person kinda like how it’d rotate around a humanoid normally. I think it needs to be scriptable, but still needs to follow the Cframe, which Idk how that would work.

In that case, mark @BandQueenForever 's answer as the solution. If none of the camera types work, you will likely have to script the CFrame via a loop, and by setting the CameraType to scriptable.

1 Like

image
I tried making a loop and it’s not updating the CFrame. How would I make it work?
(I’m a beginner to scripting)

For some reason it keeps going 3rd person when I do a loop.

Ok, so 2 things.

  1. I would try and use any other method of constanly updating the CFrame before I would resort to an infinite while loop.
  2. In your while loop, you are setting the camerasubject. You need to constantly set the CFrame, not the camerasubject.

On the topic of number one, what method are you using to spin the part? Is it a bodymover, vectorforce, CFrame:Lerp(), etc.

Don’t know what this exactly counts as out of those.

When the player exits the main menu, how does the script break this while loop?

I mean the spinner just keeps spinning, but the camera sets back to the humanoid after the screen fades from black.

image
image
Got this error, am I referencing it wrong?

I would consider experimenting with other methods of constantly rotating a part. I have found something called AngularVelocity, which is the replacement for the now deprecated BodyAngularVelocity.
Here is the link to the documentation: