local player = game.Players.LocalPlayer
tele = {"Tp1","Tp2","Tp3","Tp4","Tp5","Tp6","Tp7","Tp8","Tp9","Tp10","Tp11","Tp12","Tp13"}
spawnz = game.Workspace.Spawnz:GetAllChildren()
randomIndex = math.random(1,#tele)
randomElement = tele[randomIndex]
randomColor = BrickColor.new(randomElement)
function SpawnPlayer()
local torso = player:WaitForChild("Character")
local torso = player.Character:WaitForChild("Torso")
local spawnedIndex = math.random(1, #spawnz)
randomElement = spawnedIndex()
torso.CFrame = CFrame.new(spawn.Position + Vector3.new(0,3,0))
end
player.Character.Humanoid.Died:connect(SpawnPlayer)
I don't know where this script should be plus what kind of script is it like local or none local script. I want the players to spawn in different spawn each time they die.
