Waypoints/Marker System

Yesterday I created a marker system that displays your distance above a block on a BillboardGui. It’s a really simple script, but I’m proud of the way it turned out.

In the video, the distance displayed on the GUI is in kilometers (I’m using it for another game at the moment), but it can be changed to any unit of distance with some math; I’ve tried it with meters as well as studs.

Another feature of the script is that the loop that updates the distance breaks once the player is a certain distance away so it doesn’t continuously run even when the player can’t even read it. This greatly improved the performance of the game during the tests I did.

The only issue as of now is that in multiplayer, it only displays the distance of the closest player to the block, and isn’t adapted to show each player’s distance locally. If anyone knows how to correct this, information would be greatly appreciated.

I’d also like some feedback on the UI design. I’m not that caught up on the features of Roblox’s GUIs, so I know I could improve on the current design.


If you’re interested, you can test it out here. It’s a really basic script as I said before, but I guess I could make it open-source if enough people asked for it (and if the bugs were ironed out).

https://www.roblox.com/games/7255360954/marker-system

2 Likes

If you used a local script that only focuses on game.Players.LocalPlayer then it will be local.

1 Like

How would I arrange the code to do that? I tried this and it isn’t working:

I’m kind of bad with the difference between Players and their Characters, as well as the different between normal player and LocalPlayer so excuse me if this is a dumb mistake

1 Like

There is no difference between a normal player and LocalPlayer, just that you can only use LocalPlayer in local scripts. Characters is just the players character in workspace, so Player.Character is the same as workspace[Player.Name].

You don’t really need to be doing ipairs here, you could just remove that whole line and see how it works from there. Also where you have the elseif distance > (50) then with the break, you actually dont want that as it’ll stop the loop.