Mod by 0 error I’m having (CLOSED)

is there any way to fix this?

Not sure if that’s the error you’re mentioning, but you should change if ( > 12) by if ( >= Main.keyAmmo.length) otherwise you’ll try to access data outside of your array.

12 is the last value but its index is 5.