Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Lock mouse help?

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

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.

3 comments

0

it has to be in 3d person when it moves

0

i already know that if its a low number it will do that

0

oh ok

This discussion is preserved as it was. New answers, comments, and votes are closed.