Just need the character to teleport to a bricks location when they reset. I have a team changing script all functional but when the player resets I need them to teleport to their teams area. This is what I got yet nothing happens? No output errors just nothing at all.
local player = game.Players.LocalPlayer
local character = player.Character
local teles = workspace.Teams
if not character or not character.Parent then
character = player.CharacterAdded:wait()
if player.TeamColor == "Black" then
character.Torso.CFrame = CFrame.new(teles.Imptel.Position)
elseif player.TeamColor == "Forest green" then
character.Torso.CFrame = CFrame.new(teles.RebTele.Position)
end
end
Any help would be greatly appreciated. It's a LocalScript in the PlayerGui.

2 comments
first off all use the died function then use the teleport script, that should start u off
first off all use the died function then use the teleport script, that should start u off