I'm working on a mini-map, but I'm having problems with making the arrow in the center rotate to match the camera's rotation.
( Like in any RPG mini-map. The arrow points towards the direction you're facing.)
I've tried using lookVector and :toEulerAnglesXYZ(), but neither seem to work correctly.
The two codes I've tried are;
local x,y = workspace.CurrentCamera.CoordinateFrame:toEulerAnglesXYZ();
script.Parent.Frame.Dot.Arrow.Rotation = math.deg(x);
and
script.Parent.Frame.Dot.Arrow.Rotation = math.deg(workspace.CurrentCamera.CoordinateFrame.lookVector.X);

1 comment
That works. Thank you.