I have a folder " Spawners" in the workspace with multiple parts called "1", "2".., but it does not work with the script below. It said "Workspace.Spawners.Script:6: attempt to index number with 'Value'.
local Spawners = script.Parent:GetChildren()
local Zombie = game.ReplicatedStorage["Zombie"]
while true do
local SpawnChosen = math.random(1,#Spawners)
for i, v in pairs(Spawners) do
if v.Name == SpawnChosen.Value then
local Clone = Zombie:Clone()
Zombie.UpperTorso.CFrame = v.CFrame
end
end
wait(1)
end

2 comments
Zombie.UpperTorso.CFrame = v.CFrame -- I put parts in the workspace. So , is it gonna teleport clone to where parts are
try the new code i posted :) i think the problem was that 'v' and 'SpawnChosen' were different variables and so you cant compare them so i just inverted both of them to strings before comparing hope i helped! tell me if it works.