Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I detect if someone's in first person?

How do I tell if a player is zoomed all the way in?

1 answer

Check the CurrentCamera Magnitude.

-- Should be in a LocalScript in the PlayerGui.
local Cam = game.Workspace.CurrentCamera 

game:GetService('RunService').Stepped:connect(function() -- Runs 1/30th of a frame. (A loop)
	if (Cam.focus.p - Cam.CoordinateFrame.p).magnitude <= 1 then 
	Print 'player is zoomed in. (Do stuff here)'
	else
	Print 'player is zoomed out.  (Do stuff here)'
	end 
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.