You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want to force disable shiftlock but only for a specified amount of time. -
What is the issue? Include screenshots / videos if possible!
The issue is that I think it’s only disabling the shiftlock switch and not forcing a player out of shiftlock. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’ve tried looking for solutions but they are all either not related to disabling shiftlock or they haven’t had any solution, some just told the person to disable shiftlock completely from StarterPlayer, but this isn’t what I want since I don’t want to disable shiftlock permanently.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
This is the part of my script that I’m trying to fix (It’s in StarterCharacterScripts)
player.CharacterAdded:Connect(function(char)
local controlmodule = require(player.PlayerScripts:WaitForChild("PlayerModule"))
local camera_module = controlmodule.CameraModule
local shiftlock = require(camera_module.MouseLockController)
local Controls = controlmodule:GetControls()
ForceDisableShiftlock.OnClientEvent:Connect(function(duration)
Controls:Disable()
shiftlock:FindFirstChild("BoundKeys").Value = ""
task.wait(duration)
Controls:Enable()
shiftlock:FindFirstChild("BoundKeys").Value = "LeftShift, RightShift"
end)
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.