im making a first person game and u have to use the mouse and you cant go out of first person
You have two options.
The easiest method is to add an invisible GUI element with the Modal property ticked.
The other method is to set the ModalEnabled property of the UserInputService to true.
Both of these will do exactly what you need. :)