Im trying to make a script that finds a item from replicated storage and gets its rarity (its Parent) but for some reaosn it does not work with the rare and Epic raritys? Here is a picture of the explorer tab:
Here is the script that is getting the Error. and btw it is on the lie 4,
local unboxableItems = crateProperties["Items"]
table.sort(unboxableItems, function(a, b)
return
(rarityProperties[items:FindFirstChild(a, true).Parent.Name].Order.Value < rarityProperties[items:FindFirstChild(b, true).Parent.Name].Order.Value)
or
rarityProperties[items:FindFirstChild(a, true).Parent.Name].Order.Value == rarityProperties[items:FindFirstChild(b, true).Parent.Name].Order.Value
and
(a < b)
And if you want to know how I got [“Items”], here is the script:
local properties = {}
properties["Items"] = {
"Bluesteel", "Cheetah", "Frost", "Noob", "Poker","Radioactive","Rainbow","Sparkletime","Stained",
"Magma", "Origon", "Transparent",
"Cyberunk"
}
properties["Chances"] = {
Common = 60;
Uncommon = 30;
Legendary = 2;
}
properties["Price"] = 0
properties["Image"] = "rbxassetid://79934763818940"
return properties