I am making a game with a main menu that will have GUI covering the screen. I want the player to be in first-person with a freed mouse so they cannot hold right-click down to freeze their mouse or use their scroll wheel to zoom in. I am not that good at scripting so I don’t know how to do this. Please help!
Maybe try making their head into the camera? Like the camera cframe is the head cframe
You should have a GUI with ‘.Modal’ (or ‘ModalEnabled’, forgot the name) enabled, it allows the mouse to move while in first person
Do you mean UserInputService.ModalEnabled, this would disable character movement.
Just set the camera to the head CFrame.
UserInputService | Roblox Creator Documentation to unlock the mouse
Player | Roblox Creator Documentation to lock first person
unless the right mouse button is down.
I know that’s what it says, but from my experience of setting the camera CFrame to the head, you can’t move the camera freely either
put this script into the StarterGui
local plrGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
local screenGui = Instance.new("ScreenGui", plrGui)
local Button = Instance.new("TextButton")
Button.BackgroundTransparency = 1
Button.Size = UDim2.new(0, 0, 0, 0)
Button.Modal = true
Button.Parent = screenGui
Thank you so much for this! You’re awesome.
that’s a really hacky way of achieving what your trying to do, you should probably look into what @steven4547466 posted