This code picks a random spawn to teleport the character to. This code is a bit long so how would I use math.random() to make the code shorter and work more efficiently?
local connor =(math.random(13))
if connor == 1 then
plr.Character:MoveTo(workspace.Spawns.S1.Position)
elseif connor == 2 then
plr.Character:MoveTo(workspace.Spawns.S2.Position)
elseif connor == 3 then
plr.Character:MoveTo(workspace.Spawns.S3.Position)
elseif connor == 4 then
plr.Character:MoveTo(workspace.Spawns.S4.Position)
elseif connor == 5 then
plr.Character:MoveTo(workspace.Spawns.S5.Position)
elseif connor == 6 then
plr.Character:MoveTo(workspace.Spawns.S6.Position)
elseif connor == 7 then
plr.Character:MoveTo(workspace.Spawns.S7.Position)
elseif connor == 8 then
plr.Character:MoveTo(workspace.Spawns.S8.Position)
elseif connor == 9 then
plr.Character:MoveTo(workspace.Spawns.S9.Position)
elseif connor == 10 then
plr.Character:MoveTo(workspace.Spawns.S10.Position)
elseif connor == 11 then
plr.Character:MoveTo(workspace.Spawns.S11.Position)
elseif connor == 12 then
plr.Character:MoveTo(workspace.Spawns.S12.Position)
elseif connor == 13 then
plr.Character:MoveTo(workspace.Spawns.S13.Position)
end

5 comments
you could just concatenate the random number, and use that to find the child. workspace.Spawns[ "S"..connor ]
not sure if this will work but try doing plr.Character:MoveTo(workspace.Spawns.S[connor].Position)
nope that won't work, you have to concatenate.
or... ya do what Percil just said XD
fight ma, jk