Legit I have to make my question title complicated to get this through.
I was wondering on how to make a non-laggy loop.
while true do wait(.01) game.Players.LocalPlayer.CameraMode = Enum.CameraMode.Classic end
Doing this, I feel like it lags my game making spawn delays (I'm not 100% sure on that). I wonder if what I made is correct and if there's another way to loop without lag.
One thing that you could do is this:
while wait(0.01) do game.Players.LocalPlayer.CameraMode = Enum.CameraMode.Classic end
The problem with this script is that you don't need to be constantly setting the CameraMode. If you put this LocalScript in StarterPlayerScripts with this single line, it'll have the same effect.
game.Players.LocalPlayer.CameraMode = Enum.CameraMode.Classic
Another thing that you can do is just a simply wait .5
while true do -- Sets the loop to constantly run. wait(.5) -- Waits .5 game.Players.LocalPlayer.CameraMode = Enum.CameraMode.Classic -- Enables the camera to classic! end
Even though the camera mode in Roblox Studio is already classic, you can make sure that you set it to that by going in through StarterPlayer and clicking it to Classic.
The while true do and wait(.5) are not needed because when you set the mode of a camera you're locking it to that mode.
game.Players.LocalPlayer.CameraMode = Enum.CameraMode.Classic -- Enables the camera to classic without having to put in the while true do loop!
This should work, hope this helped!
Extra Help