Hello, I have a little problem
local LootPlan = require(game:GetService("ReplicatedStorage").LootPlan)
local orePlan = LootPlan.new("single")
local oreInfo = {
["Coal"] = {
["Color"] = Color3.new(0.14902, 0.14902, 0.14902),
["Amount"] = 3,
["Delay"] = 0.55,
["Rarity"] = 5
},
["Copper"] = {
["Color"] = Color3.new(0.745098, 0.12549, 0.0431373),
["Amount"] = 3,
["Delay"] = 0.6,
["Rarity"] = 5
}
}
for i, ore in pairs(oreInfo) do
orePlan:AddLoot(ore, ore.Rarity) -- This is the issue, it selects the table coal, copper, and other ores I'll add later on
end
How do I make it not select it as a table, even though it is, because when I do this:
local chosenOre = orePlan:GetRandomLoot()
local ore = game.ServerStorage.Ores.Stone:Clone()
ore.Position = newPos
ore.Parent = workspace.Cubes
ore.Name = chosenOre
ore.Color = chosenOre.Color
this happens
ServerScriptService.OreGeneration.oreGeneration1:78: invalid argument #3 (string expected, got table)
tostring makes the weird table key with random characters, tried searching on the devforum but as long as I can see , I’m either dumb or nobody talked about them