How to tell if mouse is off-screen?

MousePosition, MouseDelta only works if MouseLockEnabled

How are you fetching the mouse postion, UIS:GetMousePosition() every frame, or are you using an event of UIS which returns the mouse position when it changes?

Also, you can use the mouseDelta without the mouse being locked, you’d just store the previous mouseposition each frame, and subtract the new position from the old.

Could you create a virtual cursor and make the player lock in first-person view? You could detect their cursor movement by UserInputService:GetMouseDelta() and the actual cursor will never go off-screen, nor the virtual cursor if you script it to not go off-screen.