Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

A compass that points toward a part?

Asked by 6 years ago
Edited 6 years ago

How would I make a gui compass that points toward a certain part? I've searched YouTube and the wiki and I can't find anything on how to make an active compass. Please give me hints on how to do this.

2 answers

Log in to vote
1
Answered by 6 years ago
Edited 6 years ago

You would need to find the radius at which the player is from the part and then calculate the rotation of the line from that. The position of the pointer gui should always be at the center of the line and make it so that the pointer gui is centered on its position using properties (I forget what the certain property is called). the position needs to be at the center because the line rotates on its center no matter what. Good luck this stuff is pretty advanced but hopefully you will be able to do it.

0
I just started scripting like a month ago, I know a good bunch of lua but not everything rilgundam 65 — 6y
0
And I don't even know where to start:^( rilgundam 65 — 6y
0
Plz help me rilgundam 65 — 6y
0
i wouldnt jump to this if you are new try to start off with easier parts of your game and work up to this Volodymyr2004 293 — 6y
Ad
Log in to vote
-1
Answered by
Smach28 10
6 years ago

You would need to use CFrame http://wiki.roblox.com/index.php?title=CFrame, so the rotation of the GUI pointer points to the direction of the CFrame.

Answer this question