Attribute Abuse

So I know that attributes are really useful when coding. I personally use them a lot. But recently, I feel like I’ve been using them a little too much. Is there ever a point where it gets to just pure “abuse” or excess use of a feature? I don’t want to end up relying on attributes for everything since there might be better ways to write code that I might not know of. If there are better ways that you can personally suggest, please let me know.

2 Likes

They are fast and useful, but remember they replicate every time they change. So the only “abuse” to worry about is when the replication traffic becomes so excessive that it destroys the bandwidth on your clients (players).
Example, say you use an attribute to track a counter of some type (time, score, points, etc.) If the client does not know about this and only the server needs to keep track, don’t set any of them in the workspace. Otherwise, your clients are getting “updates” every-time they change and it just waste bandwidth, RAM, and CPU on the client to do this.
I’m sure someone will chime in about “tags”, but I have found the attributes to be quite useful since they fixed them up years ago to be light-years faster than when the feature initially came out.

1 Like

I’m not very good at scripting, but if I understand correctly, this is my idea for you.
For example, you might change your mind and want to change that number later. This will take a lot of time. But if you write the code in such a way that you specify that number in the code configuration section, I think it will be much better. But I have another idea that I don’t think is interesting, but it is this:
Or create a folder in the server section of the script service and then add whatever “attributes” you have in it and then connect the parts to it.