I have done a few changes, but it keeps repeat the code over and over again without stopping, I have changed the code to stop, but it does not stop, and there is no Output, here is the script;
repeat wait() until game.Players.LocalPlayer local plr = game.Players.LocalPlayer repeat wait() until plr.Character repeat plr.CameraMode = 0 wait(.1) plr.CameraMode = 1 wait(.1) if plr.CameraMode == 1 then break end until plr.CameraMode == 1
Line 1 is unnecessary, LocalPlayer will always exist.
I also don't see the point of a
repeat loop since you're essentially doing;
--You set the camera mode to 0, then set it to 1, but you end the loop when the camera mode equals 1, thus you're doing: plr.CameraMode = 0 wait(0.1) plr.CameraMode = 1
Why you would want to set it to normal, then LockFirstPerson one tenth of a second later, I have no idea. It seems rather pointless. It you just want to set the camera to LockFirstPerson, any of these three pieces of code will suffice:
game.Players.LocalPlayer.CameraMode = 1 --Or, game.Players.LocalPlayer.CameraMode = "LockFirstPerson" --Or, game.Players.LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
If you wanted to do something other than this, please say so.