local Rocks = {
'iron-rock', 'copper-rock', 'uranium-rock', 'zinc-rock', 'aluminium-rock', 'chromium-rock', 'coal-rock',
'lead-rock', 'nexelit-rock', 'nickel-rock', 'phosphate-rock-02', 'quartz-rock', 'salt-rock', 'tin-rock',
'titanium-rock', 'volcanic-pipe', 'regolites', 'rare-earth-bolide', 'phosphate-rock', 'sulfur-patch',
'bitumen-seep'
} -- 21 elements
local SelectedRock = math.random(1, 25)
local rock = Rocks[SelectedRock]
I'm not sure what lua does in the case of array overflow, but this looks like what's causing the error.