I'm trying to make "A" happen below whenever a player is within 10 studs of part, but I cannot get the CurrentCamera because this is inside a Script and not a LocalScript. Is there a work-around for getting the player's position into "camera.CoordinateFrame.p" below?
Note: This is a single player game and there are no other players in the server.
camera = game.Workspace.CurrentCamera
part = --part location here
if (camera.CoordinateFrame.p - part.Position).magnitude < 10 then -- check if you're less than 10 studs away
--A
end

1 comment
why not just use the players character ?