Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

When i wanna change the camera's focus part, it wont go to the part!?

So i tried this in the game i originally want it in and it didn't work, and i did it in another place and it worked.

This is what i tried in both games:

workspace.CurrentCamera.CameraSubject = workspace.CamPart --The part the camera focuses on.

This didn't work in the original game i wanted in. Instead it focused on the Humanoid (Player) the camera said, (workspace.Camera.CameraSubject) and not the part i wanted it to focus on. But on the other game, it did on the part i wanted it! On the same script. And i tested right, checked if it was Disabled, and it still didn't work in the game i wanted it to.

Plz help.

3 comments

0

camera.CameraType = Enum.CameraType.Scriptable

0

^ Bellyrium is setting the CameraType property so the CameraSubject change will be accepted by the camera. Do the above before you set the subject.

0

^thank you for being polite with this one. I just want to help; don't be rude because I'm better with code than I am teaching. However this is helpful, I see where I could have helped more.

1 answer

You need to set the camera type to Scriptable before.

 camera.CameraType = Enum.CameraType.Scriptable
workspace.CurrentCamera.CameraSubject = workspace.CamPart

This discussion is preserved as it was. New answers, comments, and votes are closed.