sarp_edon
(Sarp_edon)
September 24, 2025, 12:55am
1
So I am making a gun game that will be in 3rd person similar to fortnite
I do not know how to force shiftlock in the game
Every post I have found pointed to the same script which is pretty rough and not smooth at all
I do not mind if it changes the playermodule, I just want it to be easily enabled and disabled through a script
EDIT: the camera is not the issue because of the CameraOffset property, the issue is making the character look at the mouse
bhristt
(chris)
September 24, 2025, 3:18am
3
Here’s an editted PlayerModule so you can enable/disable mouse lock at any time (just realized you needed disabling and enabling functionality)
PlayerModuleMouseLockEdition.rbxm (142.0 KB)
To enable MouseLock, do this:
local PlayerModule = require(LocalPlayer.PlayerScripts.PlayerModule)
local cameras = PlayerModule:GetCameras()
-- sets the mouse lock active
cameras:SetMouseLockActive(true)
-- sets the mouse lock inactive
cameras:SetMouseLockActive(false)
This also works on mobile devices.
Example:
https://gyazo.com/360a3c7e418c7f899efdc1f09b780c7b
1 Like
sarp_edon
(Sarp_edon)
September 24, 2025, 10:25pm
5
you do not realize the amount of pain i have been through to find this tysm
system
(system)
Closed
October 8, 2025, 10:25pm
6
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.