Help me creating a chance system

Hello, so I basically have this table:

local PotentialChances = {
		['Common'] = 60, -- 60%
		['Rare'] = 30, -- 30%
		['Legendary'] = 9, -- 9%
		['Mythic'] = 1 -- 1%
	}

And what I want to do is creating a chance system where Common is a 60% chance, Rare is 30% chance etc etc, however I’m not quite sure how to make the random chance working correctly since I was doing until now an empty table and then I inserted inside [‘Common’] etc depending on what rolled, however it didn’t work very well, so if anyone can let me know how to make it work perfectly detect if it rolled Common, Rare, etc with it being correctly 60%, 30% etc? thanks

2 Likes

Weighted Chance System Bunch of replies here on how to do it.

1 Like

It doesn’t fit my desired objective, it’s different

Which one, there are several replies and 99% answer the same question.

1 Like

Ok yeah, i found it in the replies, my bad.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.