Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to disable Mouse Lock?

Asked by 8 years ago

The title says it all. I am using this in a localscript in StarterGui. I believe this is how you are supposed to use :SetCoreGuiEnabled. So I went to the API and I believe I have it set up correctly.

game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
game.StarterGui:SetCoreGuiEnabled(Enum.ControlMode.Classic, true)

And I get this error when I attempt to run it.

20:06:52.862 - Unable to cast token to token
20:06:52.863 - Script 'Players.Player.PlayerGui.LocalScript', Line 2

Any help is appreciated :)

1 answer

Log in to vote
0
Answered by 8 years ago

Silly! This doesn't even require a script. There is a property in StarterPlayer named EnableMouseLockOption Set this to false, and there you go, mouselock removed!

0
Well, I feel like the biggest idiot ever... BinaryResolved 215 — 8y
Ad

Answer this question