MB I messed up in communicating, lets say that north of the origin is 0 or 360 degrees, what is the world angle of the origin part to the green part. I wrote 45 degrees because that’s roughly what it should be
local referenceDirection = Vector3.new(1, 0, 0) -- Reference direction along the x-axis
-- Function to calculate the angle in degrees between the reference direction and another vector
local function calculateAngle(origin : Vector3, target : Vector3)
-- Calculate the angle in radians between the referenceDirection and the vector
local angleRad = referenceDirection:Angle(vector - origin)
return math.deg(angleRad) -- Convert to degrees
end