How to make something pop up only while in first person

How would I make it so that only when a player is in first person, a decal (probably a dot) would show up in the middle of the screen, and then when they are in third person, the decal goes away? Example: (From Hudzell’s “Parkour”)

Thanks for reading!

You can check if the player is first person by checking if the magnitude between the camera’s position and the head’s position is less than 0.5. If so, you’d make the image on the screen visible, and if not, make it invisible:

local rs = game:GetService("RunService")
local camera = workspace.CurrentCamera
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local head = character:WaitForChild("Head")

RS.Heartbeat:Connect(function()
    local isInFirstPerson = (head.Position - camera.CFrame.Position).Magnitude < 0.5
    script.Parent.Visible = isInFirstPerson
end)

This should be parented to the image that you want to be visible

3 Likes

Thank you! I believe this is the solution I need!