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

Lock mouse help?

Asked by
qwrn12 85
8 years ago

i made it so that the mouse is locked in center of screen

game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.LockCenter
game:GetService("UserInputService").InputChanged:connect(function(inputObject)
    if inputObject.UserInputType == Enum.UserInputType.MouseMovement then
        game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.LockCenter
    end
end)

now how ho i make it so that it moves the camera when you move the mouse in 3d person

2 answers

Log in to vote
0
Answered by 8 years ago

If you wanna do it simply just set the CameraMaxZoomDistance under StarterPlayer (Properties) to a low number. The player can't zoom out, and it moves the camera with the mouse, but it still stays center screen. That's the easy way. But there are other ways.

0
it has to be in 3d person when it moves qwrn12 85 — 8y
0
i already know that if its a low number it will do that qwrn12 85 — 8y
0
oh ok anjaclawnova 10 — 8y
Ad
Log in to vote
-1
Answered by 8 years ago

Trying to do fp? Its in the player.

Answer this question