Confused about this

Script:

local Select = enemymodule.List
local random = Select[math.random(1, #Select)]

Module:
local Module = {
List = {
[“funny1”] = {
Enemy = “funny1”;
Volley = 1
};

	["funny2"] = {
		Enemy = "funny2";
		Volley = 3
	};
};	

}

return Module

it says invalid argument #2 to ‘random’ (interval is empty) whenever the script tries to spawn the enemy

This is saying that the max is less than the min.

Accessing Non-number array but you used random number!?

local Module = {
List = {
{Enemy = "funny1",Volley = 1},
{Enemy = "funny2",Volley = 3};
}
}
return Module

I’m just now realising, thank you for your help!

1 Like