I am creating one script that I get 1 item from a folder, and then do it spawn at one spawn locations, but the script has chosen all spawn locations at once and making spawn in just one place, What do I do?
Work = game.Workspace:GetChildren()
for i = 1,#Work do
if Work[i].ClassName == "Part" and Work[i].Name == "Spawner" then
print(Work[i])
Plus = Plus + 1
table.insert(Spawner, Plus, Work[i].Name)
end
end
local RandomSpawner = math.random(1,#Spawner)
local Town = game.Workspace:FindFirstChild(Spawner[RandomSpawner])
for i,v in pairs(Town:GetChildren()) do
if i == RandomSpawner then
Item.Parent = game.Workspace
Item.Handle.CFrame = v.CFrame
end
end
end
