I’m making a system that allows are user to spawn in multiple things at once, and when they put it into a table… the table has a name that you can use to query the function for it.
My issue is that it is not finding the item at all, even though their names are the exact same. What am I doing wrong?
← Proof that the names are the same.
Module
Settings.PresetSpawns = {
["regular setup"] = {game.ServerStorage.Matchtypes.Stages["HIVE [1]"],game.ServerStorage.Matchtypes["Barriers & Walls"]["Invisible Walls [NJPW]"]}
}
Function
function PresetSpawners(PresetName:string, What2Do:string)
if not Settings then error("NO SETTINGS FOUND") end
if table.find(Settings.PresetSpawns,string.lower(PresetName)) then
for _,Item in pairs(Settings.PresetSpawns[string.lower(PresetName)]) do
Spawner(nil,What2Do,Item.Parent.Name,Item.Name)
end
else
error("PRESET WAS NOT FOUND: Preset Name was "..string.lower(PresetName)) --[[This is the error I get every time I try to run the function]]
end
end