I'm making a spawning script that uses a table but I don't know how to use a table other then typing in the what the table will have in it like
local NPC = {"NPC1", "NPC2"}
that's all I know how to do with a table but I want to select a citizen from the table in this script
--1337Zombiegamer--
local SpawnPool = {"Citizen", "Citizen1", "Citizen2", "Citizen3"}
local NPC = game.Lighting.Citizen
while true do
local NPCCopy = NPC:Clone()
NPCCopy.Parent = Workspace
wait(30)
end
using math.random to spawn it in to the world from the lighting

8 comments
What do you mean by directory here? like the {"Citizen", "Citizen1", "Citizen2"} part?
I'm kinda confused considering how you wrote the script..
Directory I mean is... Citizen = game.Lighting.blablabla u get the point?
Okay I edited the script there we're a few things misspelled but now in the output i get a error and nothing spawns in -- 12:59:55.648 - Workspace.CitizenSpawn:7: attempt to call method 'Clone' (a nil value)
are the citizens named Citizen 1, Citizen 2 etc?
nvm I fixed it
cool. cos I tried. they spawned for me... Glad to Help! :D thnx for Rating Boost, NOOBS keep putting it Down
also sry, I accidentally told u to Parent a Random Citizen to the Workspace, meaning, removing it from Lighting... I edited my Answer if it'll Help ;)