Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

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

Asked by 6 years ago

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.

0
camera.CameraType = Enum.CameraType.Scriptable Bellyrium 310 — 6y
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. TheDeadlyPanther 2460 — 6y
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. Bellyrium 310 — 6y

1 answer

Log in to vote
0
Answered by
piRadians 297 Moderation Voter
5 years ago

You need to set the camera type to Scriptable before.

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

Answer this question