This is the code im using, and it only locks the mouse in the center, and does not force shiftlock like i thought it would, and im pretty much out of ideas on how to actually make it force shift-lock, any help?
local isShiftLocked = true
local function setShiftLock(state)
isShiftLocked = state
if isShiftLocked then
UIS.MouseBehavior = Enum.MouseBehavior.LockCenter
UIS.MouseIconEnabled = false
else
UIS.MouseBehavior = Enum.MouseBehavior.Default
UIS.MouseIconEnabled = true
end
end
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.LeftAlt then
setShiftLock(false)
end
end)
UIS.InputEnded:Connect(function(input)
if input.KeyCode == Enum.KeyCode.LeftAlt then
setShiftLock(true)
end
end)
plr.CharacterAdded:Connect(function()
task.wait(0.5)
setShiftLock(true)
end)
setShiftLock(true)
** You are now Level 6! **