I am trying to create a radar GUI for the player to use while he or she is navigating. The radar has an icon on it that is supposed to represent the player and it is shaped like an arrow. The arrow is supposed to point in whatever direction that the player is facing.
I have created a script that does this, but with a little problem; when the icon rotates, after it hits about 90 degrees, it'll rotate in the backwards direction. I noticed that when the player is rotating, the Rotation property of any part can only reach 180 degrees while the Rotation property of the GUI can reach 360 degrees. This probably has to do with why the GUI icon does this.
How can I change this script to make it so that the GUI icon continues to rotate past the 90 degree limit and properly conforms to the player's rotation?
while true do
r = script.Parent.Parent.Parent.Parent.Parent.Parent.Character.Torso.Rotation.Y
wait(.01)
script.Parent.Rotation = -r --I made this negative because when I tested it without the negative, the icon rotated backwards to the player's rotation.
end

2 comments
Thank you very much, this worked beautifully! I'd never have been able to come up with this seeing as how I am not experienced with lookVector.
No problem :)