If you want the player to be able to move their mouse, I would suggest creating a screenGui with a textButton inside. Be sure to disable the screenGui before playing.
Then activate the Modal option in the button.
Modal makes it so that if the button is on the screen, the player can move the mouse. Even in first person.
Then you can toggle it on like this:
local plr = game.Players.LocalPlayer
local gui = plr.PlayerGui.ScreenGui -- replace with the name of your ScreenGui
local hum = plr.Character:WaitForChild("Humanoid")
hum.Died:Connect(function()
gui.Enabled = true
end)
Thanks my death screen already had textbuttons on it so I just enabled MODAL. You are like goku legend I like goku and you are like goku. If you need a secret favor just ask me okay I can give you a favor. I am talking about if you hve any