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

How to detect when person goes firstperson, vice versa?

Output says An error occurred

local camera = workspace.CurrentCamera

camera.FirstPersonTransition:connect(function(entered)
	if entered == true then
		print("entered")
	end
end)

1 answer

✓ Accepted answer

You could use RenderStepped and get the distance between the camera.CFrame and the HumanoidRootPart's CFrame but 1.5 studs higher (positions), I suggest checking if that distance (magnitude) is under 0.75 or something as that is generally a first person view.

1 comment

0

thank you, I calculated the magnitude and it works, thank you!

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