Hey, I was wondering how can I make it so a monster drops random loot. i.e drops a bone 100%, gold 10%, sword 60% something like that. thank you in advance
You would want to make use of the math.random
function.
For example, if you wanted to make gold drop with a 10% chance, you could use the following:
-- If the random number is between 1 and 10, then: if math.random(1, 100) <= 10 then -- drop gold end