For reasons to not exceed the 50kb/s remote event/function data transfer, I made tables used a coding system for guns. For example, instead of having:
["AK47"] = {Damage = 40, ReloadTime = 3}
I made it:
[1] = {GunName = "AK47", Damage = 40, ReloadTime = 3}
But how my gun scripts work is that it uses the tool name to search for the stats within the table so I can easily just put:
gunDamage = gunModule[toolName["Damage"]]
But since I used a coding system, I am forced to name said tool to "1" instead of "AK47". I would rather not for an in pairs function to cycle through the gun codes and see which gunCode[GunName] matches the tool name and then breaks the loop signifying it has found it. This may be a lil confusing but I hope someone could help.