Need help making a rarity system

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

So i want to make a script where there are falling parts spawning around the map and then wherever the parts lands, a tool giver takes its place. each tool giver has its own rarity with Common, Uncommon, Rare, and Very Rare and so the parts place will have a higher chance of being taken by a common tool giver than a Very Rare tool giver

  1. What is the issue? Include screenshots / videos if possible!
    when making this i have made a script where a part is created and then falls on a random part of the map.
while true do
	local Drop = Instance.new("Part", workspace)
	local x = math.random(1,10)
	local y = 60
	local z = math.random(1,10)
	Drop.Position = Vector3.new(x,y,z)
	wait(1)
	Drop:Destroy()
end

next up i want to make a rarity system as i said before but i had no idea how to do it even after a bit of research.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    so i have tried looking into raritys around the web but it was hard to understand for me as i am still new to coding

Note: the givers are in game.ReplicatedStorage.Givers and then each raritys are in seperate folders

If i can complete this hurdle i will be insanely thankful to you guys
any help is appreciated :smiley:

2 Likes

Use a Random Number if that’s the number then drop that’s the simple way.
example:

lets say the drop rate is 1/60

then do a random number between 1 - 60
if the number is 1 then give them this item

1 Like