How do I check if a player is fully zoomed in through a local script?
3 Likes
local run = game:GetService("RunService")
local players = game:GetService("Players")
local player = players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local head = character:WaitForChild("Head")
local camera = workspace.CurrentCamera
run.RenderStepped:Connect(function()
local distance = (head.Position - camera.CFrame.Position).Magnitude
if distance < 1 then
print("Player's camera is zoomed in.")
else
print("Player's camera is zoomed out.")
end
end)
6 Likes
Thank you! It works perfectly!
Thank you very much for the help!