I have found posts on this topic however I don’t want to use the camera module as it is not a permanent shift lock.
My game relies on shift lock until player dies however People complain about turning it on themselves.
Any way to enable it when player spawns and disable it when player dies?
1 Like
You can use this module to easily toggle a ShiftLock like camera when you wish:
I’ve read a bit of the new camera and character control modules source code and came up with an implementation for center-locking the mouse while controlling the camera that also supports shift lock.
Shift lock has properties for developers to disable it in their games, but those properties are read-only in runtime, so you can’t use them to disable shift lock temporarily to stop it from affecting the camera. I’ve found a loophole, though: a StringValue named BoundKeys is available to change whi…
If you wanted to enabled/disable ShiftLock when the player Dies/Respawns, you could connect the .Died and .CharacterAdded event to the ToggleLock() function of the module.
Edit:
Apparently this module is not working for some people. If it doesn’t work for you, I would recommend investigating this example , that I know works from past experience.
sjr04
(uep)
July 20, 2020, 2:38am
#4
Doesn’t look like you’ve read the OP.
They want a way to toggle between (en/dis)abling shift lock without forking the camera scripts.
Also, this not a future-proof solution.
That appears to not work.
I read the replies as well to no avail
Oof! Apparently it is not working due to roblox removing an API.
Here is a system that I know works from past experience, that you can edit to work for you.
It is designed to work when a Tool is equipped/unequipped, but you can easily customize it to work for you.
Having trouble downloading this and opening it into roblox studio…