Basically I want to tell how zoomed a player is. If they use the scroll wheel, they can scroll in and out. I want to store how zoomed in they are in a variable.
local zoom = player.Zoom -- How do I do it?
Basically I want to tell how zoomed a player is. If they use the scroll wheel, they can scroll in and out. I want to store how zoomed in they are in a variable.
local zoom = player.Zoom -- How do I do it?
get the magnitude between the camera and the character
= (camera.cframe.p - character.humanoidrootpart.position).magnitude
I figured it out.
local function isFirstPerson()
local camera = game.Workspace.CurrentCamera
local character = player.Character or player.CharacterAdded:Wait()
local head = character:WaitForChild("Head")
return (head.CFrame.p - camera.CFrame.p).magnitude
end