Ok, so I figured out how to attach the camera to a block in studio mode, but in test mode, it sets the camera to fixed when I want it to set to attach.
In studio mode, it attaches just fine, but I can move the camera up and down. In test mode, it doesn't attach at all, it's still on fixed. I'm trying to use this script:
script.Parent.CameraSubject = workspace.Part
workspace.Camera.CameraType = "Attach"
in order to set the camera to attach. But it's always fixed, it doesn't even give me an error so I don't know what's wrong. Once that problem is solved, I need to lock the camera at a certain angle so that the player can't move it. I can't find any settings/properties that allow the player to move the camera, so I can't turn disable movement. I would really appreciate some help with this, please!
I also need to make it so that the player can't zoom in or out, I need help with this as well as I cannot find settings/properties for this either.

3 comments
@Futureprompt Ok, this is great. But I can still move it up and down and zoom in and out
I'll edit the post with a fix.
@Futureprompt Thanks! Appreciate it! :)