**Do I have to use coordinate frame of some sort? **
plr = game.Players.LocalPlayer
ZoomedIn = false
--{{Some Camera Function}}
ZoomedIn = true
print(plr.Name.." has zoomed in.")
--{{end}}
**Do I have to use coordinate frame of some sort? **
plr = game.Players.LocalPlayer
ZoomedIn = false
--{{Some Camera Function}}
ZoomedIn = true
print(plr.Name.." has zoomed in.")
--{{end}}
You can get the distance between the Camera and the Character's Head, which should be 0 if they are fully zoomed in:
plr = game.Players.LocalPlayer
ZoomedIn = false
local camera = workspace.CurrentCamera
camera.Changed:connect(function() --probably a better event to connect to than this, but this should work.
if (camera.CoordinateFrame.p - plr.Character.Head.CFrame.p).magnitude <= .5 then
ZoomedIn = true
print(plr.Name.." has zoomed in.")
else
ZoomedIn = false
print(plr.Name .. " is not zoomed in.")
end
end
This discussion is preserved as it was. New answers, comments, and votes are closed.