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

How do you properly change a players camera subject?

I put the below code in a local script in the starter characterScripts and It works.

game.Workspace.CurrentCamera.CameraSubject = Workspace.Part

this causes you to look at "Part" whenever you join the game. However, The version of the script I want is this:

wait (1) game.Workspace.CurrentCamera.CameraSubject = Workspace.Part

For some reason the wait command makes the script not work!!! I'm really confused and need help.

2 comments

0

It does work for me.

0

Hmmmm... the part's Parent is changed from a folder to the workspace, but it does not give an error or anything and the change is during the "wait (1)" your script is slightly different than mine so I'll try the "waitforchild" command.

1 answer

✓ Accepted answer

Is the part in the workspace being changed in any way? This current script works just fine for me.

Local script:

wait(1)
workspace.CurrentCamera.CameraSubject = workspace:WaitForChild("Part")

If that still doesn't work then try checking the developer console by pressing F9. If it's completely blank and it still isn't functioning then try restarting studio. I heard a few things were broken in this latest update.

2 comments

0

I added the "waitForChild" to the script and it worked. Let this be a lesson to me to always program in the proper form :D

0

oh no!!! now the script works only in studio!!! now what do I do!!!

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