Using the below code in a localscript or studio command line then shiftlocking and unshiftlocking can break mouse and a multitude of other controls, especially with tools equipped.
local PlayerScripts = game.Players.LocalPlayer:WaitForChild("PlayerScripts")
local Controller = require(PlayerScripts:WaitForChild("PlayerModule")):GetControls():GetActiveController()
print(Controller:GetIsJumping())
This makes the glitch happen every time but it can happen in different ways too.
Turn shiftlock on in settings
Run in command line during studio play
local PlayerScripts = game.Players.LocalPlayer:WaitForChild("PlayerScripts")
local Controller = require(PlayerScripts:WaitForChild("PlayerModule")):GetControls():GetActiveController()
print(Controller:GetIsJumping())
Turn shiftlock off and back on in settings then shiftlock and itll be broken.
Thanks for letting us know. We still couldn’t seem to reproduce the behavior neither with the file, could you provide us a more thorough video demonstration starting at edit time on a baseplate?
0:00 to 0:14 : The expected behaviour is shown, this is before execution of the given script.
0:15 to 0:44 : Right when the script was executed via command bar, the camera position moved to the back of the player (unexpected behaviour). The player then pressed the Shift key to toggle shiftlock 3 times (the amount of times to shiftlock varies, it usually happens first try) and that causes the mouse to lock to the center of the screen without holding right click on the mouse (unexpected behaviour).
Please note that the unexpected behaviours are very random. Sometimes it may not move the camera position, and sometimes it will lock the mouse upon the first toggle, or after a few toggles. Sometimes, it may even take multiple executions, but regardless this behaviour should not happen at all.
The place does not matter, this same issue occurs on a newly made empty baseplate, and even with R15 characters. No default modules or scripts are edited whatsoever. There is no custom shiftlock; it is the default Roblox shiftlock.
This is the script. It calls a Get method (GetIsJumping) from a default Roblox module (PlayerModule) which should only return a bool and cause nothing else to happen:
local PlayerScripts = game.Players.LocalPlayer:WaitForChild("PlayerScripts") local Controller = require(PlayerScripts:WaitForChild("PlayerModule")):GetControls():GetActiveController() print(Controller:GetIsJumping())
This seems to be an issue with executing the script in a different context in the command bar, which will load a separate PlayerModule. For your use case to query the PlayerModule, you should use the GameScript context to ensure that your command is executed in the correct context. I will close this ticket, feel free to let us know if you are experiencing any additional problems!