This should definitely work, as this is the result: https://gyazo.com/171cf0814bbb621c4782f3ad40900c77
You may not be using the correct position for the compass. This is what I have done taking from the WorldToScreenPoint article’s code and applying the formula. I’ve added + 90 as it appears there was an offset.
local camera = workspace.CurrentCamera
local vector, onScreen = camera:WorldToScreenPoint(workspace.Part.Position)
local screenPoint = Vector2.new(vector.X, vector.Y)
local frame = game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame
frame.Rotation = math.deg(math.atan2(screenPoint.Y - frame.AbsolutePosition.Y, screenPoint.X - frame.AbsolutePosition.X)) + 90