I am aware that the script below doesn't work properly and gives an error on line 3. I don't know how to fix it, can you guys help me make it so when the player clicks the button, his Shift lock goes invisible and when clicks again, it appears?

local mouse = game.Players.LocalPlayer:GetMouse()
function click()
	mouse.MouseLockedCursor = 'rbxassetid://132103568'
	
end

script.Parent.MouseButton1Click:Connect(click)

2 comments

0

what is the error

0

MouseLockedCursor is not a valid member of PlayerMouse