Camera only looking in one direction

I have a camera script that is supposed to follow the Y orientation axis of the root part, but I noticed that if the player walks on a wall, it kinda breaks because its in world space and not local space. The issue is that if I use rotation (which is in local space) it never goes into negatives which prevents it from facing backwards. I don’t really understand what I’m doing wrong here.

self.PanY = self.Handler.RootPart.Rotation.Y -- Local Space

self.PanY = self.Handler.RootPart.Orientation.Y -- World Space

How can this be solved?

Thanks!

1 Like