local Spawnz = Workspace.Spawnz:GetChildren() --Not GetAllChildren
Game.Players.PlayerAdded:connect(function(player)
local lastSpawn = nil
player.CharacterAdded:connect(function(character)
repeat
local spawn = Spawnz[(math.random(1, #Spawnz)]
until spawn ~= lastSpawn
lastSpawn = spawn
wait() --Let the Character fully load
character.Torso.CFrame = spawn.CFrame + Vector3.new(0, 3, 0)
end)
end)
There is an error local spawn = Spawnz[(math.random(1, #Spawnz)] <----right there the ] is an error. On the output it says line 7 is an error. Please help me anyone.

2 comments
Please dont use Spawnz with a z. When scripting it is important to try sticking to proper english so it makes life easier
whats the outputs full comment?