GUI Input in Locked First Person Camera Mode

I’m working on a FPS style game, and one of things I’m trying to figure out is how to allow players to click on GUI elements while in First Person mode.

I’ve tried messing around with GUIButton.Modal and making sure the ScreenGUI was Enabled / Active but I have yet to produce a result that I am pleased with.

I want to be able to show a GUI and essentially take away focus/input from the game and allow free mouse movement while hopefully being able to maintain first person mode.

3 Likes

You may be interested in the UserInputService.MouseBehavior property. Setting it to Enum.MouseBehavior.Default should allow the mouse to move freely. Let me know if this is not the case, I’d have to do some digging into the camera script.

3 Likes

Hey thanks for the suggestion, I did some more messing around, and ended up creating a local script to control the camera state when ever a GUI gets open or closed to allow mouse or go back into first person mode.

3 Likes