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

How to let mouse move freely when CameraMode is set to LockFirstPerson?

Asked by 3 years ago
game.Players.LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson

if unlock == true then
    game.Players.LocalPlayer.CameraMode = Enum.CameraMode.Classic
end)

Altough when testing, the property did change to Classic, but the mouse is still stuck at the middle, not moveable.

2 answers

Log in to vote
0
Answered by
nievadev 112
3 years ago

GUI buttons have a field known as "Modal" that, when true, will unlock the mouse in first person as long as that button has its "Visible" field set to true.

I would set it manually in Studio, then you will not have any problems.

Remember to accept the answer if is it helpful for you! I'm glad to help :)

Ad
Log in to vote
0
Answered by
Gingerely 245 Moderation Voter
3 years ago

Pretty simple, just simply set workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable and good to go :)

Answer this question