Is it better to keep attributes in a table or get them when needed?

This is a question regarding performance / optimization

I’d say it’s better to use :GetAttribute() directly when you only need the attribute a couple of times throughout the script but otherwise keep the attribute in a table or a variable for example when you need them every render frame. Is this correct?

1 Like


It is better to keep attributes in a table. It is faster than getting them with Instance:GetAttrubute(). I recommend you to use that function when it is really needed.