GunObjects[47][0] <-- Your arrayGunObject[i] = CreateDynamicObject <-- Trying to use a array in a DynamicObject