How to make unturnable shiftlock

I made a knockback and when i shiftlock and turn my screen my character suddenly fling

You can try this

-- local script in playerScripts or starterGui
local UserInputService = game:GetService("UserInputService")

UserInputService:GetPropertyChangedSignal("MouseBehavior"):Connect(function()
    if UserInputService.MouseBehavior == Enum.MouseBehavior.LockCenter then -- detects if player enables shiftlock
        workspace.CurrentCamera = Enum.CameraType.Scriptable -- locks camera
else workspace.CurrentCamera = Enum.CameraType.Custom
    end
end)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.