Hi, I don’t know if anyone has made a tool like this and released it, so excuse me if someone has. Please note that the scripts don’t take into account every single possibility.
Some time ago, I needed help visualizing server delay to see where my character truly is.
I saw many people questioning hitboxes on the DevForum as well, so I decided to create this module.
I have no reason to keep this to myself and believe others can benefit from it.
There are many use cases for this, mainly debugging hitboxes and lag.
Yes, I know you’re already bored reading this—there’s simply not much to say.
And excuse me if the code looks messy or unreadable.
If you think someone can benefit from this, feel free to share it with them.
If you find any problems with it, let me know.
What does it do?
It shows you where your character is to the server and other clients using Selectionboxes.
Installation
Simply install the .rbxm file and put it anywhere you want.
Kinda cool actually. I just wish the code wasnt so messy.
If you simulate high ping it actually shows the worse desync similar to actual lag in game which is super awesome really. I definitely use this but clean up the code.
The code concern is ‘meh’, i doubt most people would concern themseleves with the code rather than using the tool. it works fine so i might just leave it as is.
Yes actually. Readability. I took 30 minutes re-writing your script(s) to help improve this and also networking. Not benchmarked, but creating the instances on the server and updating them there cuts the RemoteEvent, unlike what you did. You can update your code or overwrite it with this one, I just wanted to make stuff readable. Also makes it “OOP”, having more “customization” and better handling when wanting to get rid of it
Alright, so you remade the code and added extra features lol?
As I mentioned before, when replying to someone else’s post, readability isn’t as much of an issue as long as you understand basic Luau.
What I did was create everything on the client and simply sent the cf and other stuff to the client. The purpose of this tool is to show you where you are to other clients and the server.
I also mentioned that it doesn’t account for all possible scenarios, which means I didn’t add extra features like player removal or customization options.
(but you still can customize it.)
If one wants to change the color, they can just go into the script and change the Color3.fromRGB(0, 229, 255) to whatever they want.
I don’t see any real issues with the script. Do you just look through posts and just say ‘yo bro, your code is unreadable’? like i actually thought for a sec that i uploaded an obfuscated file.
The code is very much readable, maybe point out specifically where you just look at your screen and nearly puke?
And by the way, its less about readability and more about wether the reader can easily understand the code.
Usually code being readable also determines if it’s optimized or not, and I assume everyone would want that. I am also not the only one that said it unreadable, and while it’s not “unreadable”, it’s definitely hard to decipher it.
I added that as a customization example aswell as the possibility of having multiple colors without having to change the code or duplicating it.
Mainly the RemoteEvent’s arguments, like letters are really hard to understand in this case.
Though the pcall is a bit of a smart move to dealing with errors regarding the findP function, it’s definitely not an optimal way of doing that.
If you allow to rephrase the past, I’d like to change my wording to “a bit of effort needed to understand both structure and function of your code”. But yes, sometimes I do go on posts, see what stuff are “short” and “weird” and remake them. Don’t take it as an insult, it’s both me exercising and you seeing maybe a better (as in process-optimized) result, depends entirely on you if you will want to accept the advice.
sure the remot args might be a bit bad ill give you that. v is just a number, c is cframe and so on, if you read what each thing does in the small if statement, one would know.
If the code was very long, i would have put in the effort to give the remote args better names.
Mehhhh. depends on the person reading it. coding style is subjective.
i tried changing findP for something else while making the script at that time but found that just using a function is easier. Of course at the time the thought of giving it away wasnt in the back of my mind, i just wrote the code how i would understand it.
Ill take on criticism with no problems, but you could’ve provided more info, not just ‘your code is unreadable’. i didnt take it as an insult dont get me wrong, i was just a bit confused.
Glad you had fun mate
(By the way, your version shows the visualization to everyone, not just you (the player), thats why i used 2 scripts and a remote.)
Oh, yeah, that didn’t cross my mind. Good catch. Though, an optimization for that matter is sending the full cframes and parts at the same time in one big table, due to invoke overhead. But yes, this works