Run time shift lock disable

Hi, so I’m currently animating a transformation for an animation inspired game… I’m running into the problem as shift lock is enabled the transformation looks very odd. I was wondering if there’s any way to disable the shift lock during the runtime.

Without Shift-lock: https://gyazo.com/f1f3a08ffa79b6e7bfe9d823f621511d

With Shift-lock: https://gyazo.com/aecf6c9f9647aca2af849019e0bda578

I don’t mean DevEnableMouseLock in the player settings as that is ment for pre runtime and if the lock is already enabled this does not change it.

1 Like

Make the camera scriptable and lock the humanoidrootpart of the player, might work I think.

Yes, but that’s required to create a fluent transformation…

The camera was set to scriptable from the start. Locking the root didn’t help sadly

I found an old thread, but I tried to put it into a local script and it seems to be outdated and not working Custom center-locked mouse camera control toggle

I tried that, It breaks the script, it never actually unlocks the camera

Have you made sure for certain that the camera is on scriptable?
Try playing the game then go to explorer, click camera, and click on properties, if it doesn’t show scriptable, try adding a wait(3) (ik this is probs a bad idea though just for testing purposes) and see if it works.
Check output log for any errors as well.

But does the spinning problem still occur with shiftlock on even with scriptable? How does the cutscene animation/player work when activated?

Camera is set to scriptable and the CFrame is set to the humanoidrootpart * the angles/frame

Odd, usually setting it to scriptable should pretty much prevent shiftlock from working unless retoggled back:
https://gyazo.com/a613b3f410fa7cc5b00d4f0a16e44a44

Have you set the BoundKeys value back to the default or set keys?

boundKeys = {Enum.KeyCode.LeftShift, Enum.KeyCode.RightShift}

Turn on shift lock first, then use script cam

Scroll up we talked about this already

If all else fails, try switching the camerasubject to another part
actually, that doesn’t work either-

Yes but you said it never unlocks it. I would assume it’s because you didn’t set the boundKeys back to the defaults/set keys.

Setting bound keys doesn’t unlock the camera, it only breaks the script not allowing you to change the toggle.

If I’m not wrong, going into StarterPlayerScripts and grabbing (grab playermodule/cameramodule/controlmodule all together):
image

Should allow you to change/enabled/disable shiftlock via the module. I might be wrong on this but its better to try than not :man_shrugging:

God I hate dealing with modules… I don’t know where to get started as I would have gone the same route as this outdated script…

Imagine modules as a list of functions in a neat order, you can collapse all the functions and read what they do.

require() the module and then call the function as you would usually.