Moving mouse in first person

Hi, i wanna do when you zoom in the first person you still can move the mouse,
like in third person.
If you don’t understand what i’m saying,
watch this video below me.

I don’t understand can someone explain how to do this?

1 Like

You can do that by adding a ScreenGui in StarterGui, put a TextButton inside the ScreenGui, and set TextButton.Modal to true. Make the button invisible by setting TextButton.Visible to false.

I did it, but it didn’t work.?

1 Like

Be sure the button’s property “Visible” is set to true. Try to scale the button to 0, 0, 0, 0 and position it to 0, 0, 0. (Just make sure it’s fully invisible on player’s screen)

4 Likes

It worked, Thank you so much!!

1 Like

Look into the MouseBehavior setting in the UserInputService.

UserInputService.MouseBehavior (roblox.com)
MouseBehavior (roblox.com)

local uis = game:GetService("UserInputService")
uis.MouseBehavior = Enum.MouseBehavior.Default -- freely move around the screen

You can also enable the CameraToggle setting to automatically switch between un/locked mouse in first person with the Right Mouse Button

This way you don’t have to do any hacky gui modal stuff. :slight_smile:

11 Likes

Yep, also a quicker solution at it :slight_smile:

ive tried this, but it doesnt seem to work for me when im zoomed in. Modal wont do because i need to interact with surfacegui’s and Modal does not allow that, is there another way to do this?

did u find a solution yet, having the same problem?