Forcing mouse lock for 3rd person shooter

I am making a 3rd person shooter and have figured out how to force mouse lock thanks to this post. How can I force shift lock?. When I force mouse lock, my camera view doesn’t change. What I mean is that when you press shift to mouse lock, your camera goes to the right a bit. However when I force the mouse lock by putting this code in, the camera doesn’t move to the right and I can’t see my gun. Just my head.

self.activeCameraController:SetIsMouseLocked(mouseLocked)
5 Likes

CameraController:SetMouseLockOffset(Vector3.new(1.75, 0, 0))

8 Likes