I’ve been trying to make a shift lock camera script for my gun, and I found out that if I added some code like this
if _G.ForceShiftLock == true then
self.activeCameraController:SetIsMouseLocked(true)
else
self.activeCameraController:SetIsMouseLocked(false)
To the CameraModule:update(dt) function in CameraModule, I could force it. I tried it but bizarrely, it didn’t force shiftlock. It locked the camera to where it was when I equipped the gun, and it wasn’t moving with me. It was just stuck in place like a fixed camera until I unequipped my gun, then it worked. This is really weird because I remember using a script just like this in another game and it worked perfectly. Can anyone offer some help?