It’s such a simple thing to do but for some reason it’s just not working.
So when you first spawn in (or at least in my case), the camera’s Orientation X is -15 degrees. I want this value to be 0, so naturally I made a script to change the angle.
I’ve made a LocalScript in StarterCharacterScripts and done the following:
local camera = workspace.CurrentCamera
camera.CFrame *= CFrame.Angles()
I thought that maybe it’s adding 0 instead of setting it to 0, so I changed the script to the following:
local camera = workspace.CurrentCamera
camera.CFrame *= CFrame.Angles(math.rad(15),0,0) --this should cancel out the rotation
Neither of these work. I thought that maybe something was interfering with the script, so I also added code to change the CameraType to Scriptable before changing rotation. That didn’t work either. I also tried putting the script in StarterPlayerScripts instead but that also did nothing.
Weirdly enough, the above script did work when I bound it to the H key using UserInputService (it panned the camera up 15 degrees every time I pressed it).
Why can’t I change the camera angle here, and how do I do so?