So if I would to have like 20 types, how would I avoid repeating the same indexes that I have and avoid the copy pasting left and right to have a more dry and neat code?
Roblox already makes sure you don’t reuse the same index in the same table.
Or do you mean not repeating the “Health”, “Armor” and “Damage” keys?
DRY is for code, this is data. I wouldn’t do anything extra here since that would make it harder to read and understand.
Yes I meant the latter one, copy pasting the same “Health” “Armor” “Damage” keys in this example… I understand what you mean in terms of readability, but this is for convenience in my case. I have way way more indexes and tables within tables. I am wondering if you could do thing in a different way like maybe have a “custom table type?”, if that was a thing that automatically have the first and second…indexes set…Or some other way.