of     1   

XlAscensionlX
#184525791Monday, February 29, 2016 5:07 AM GMT

Really weird issue here, but in a game i'm making my tables don't work right? What I have is it teleports the player into the game, and adds their name to a table, in the code below: --Function to teleport players function teleportPlayers() displayMessage("Teleporting Players...") for i,v in pairs(game.Players:GetChildren()) do if v and v.Character then v.Character.Torso.CFrame = CFrame.new(29, 64.4, 16.4) v.TeamColor = BrickColor.new("Bright bluish green") table.insert(Survivors, 1, v.Name) print(#Survivors.."..Player Teleported") displayMessage("Rising Lava...") end end end And the first tmie around it teleports all the players just fine and has the correct number of players E.G in play solo the output looks like this: > 1..Player Teleported But when it kills my character it should remove him from the table, with the code below: game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) character:WaitForChild("Humanoid").Died:connect(function() if player.TeamColor == BrickColor.new("Bright bluish green") or player.TeamColor == "Bright yellow" then player.TeamColor = BrickColor.new("Bright blue") table.remove(Survivors, 1, player.Name) print(#Survivors.."..Player Died") if #Survivors <= 0 then --Lol, less then just in case gameOver() end end end) end) Now the problem is when the game (In play solo) restarts the table says it teleports 2 players in, EG output looks like so: > 1..Player Teleported > 2..Player Teleported ~XlAscensionlX [Graphic Design://Scripter://Developer://]
drahsid5
#184526709Monday, February 29, 2016 5:27 AM GMT

Do not post code blocks, tell us you're problem, what you're trying to accomplish, and what you've tried.
cntkillme
#184526792Monday, February 29, 2016 5:29 AM GMT

I haven't completely looked through the code, but the problem I immediately spotted was: "or player.TeamColor == "Bright yellow" You probably meant to do == BrickColor.new("Bright yellow")
XlAscensionlX
#184527430Monday, February 29, 2016 5:45 AM GMT

@drahsid5, I am posting code blocks so you dont go throught a ton of lines of code to find the problem, I posted the relevant code, i'm trying to make it so the table always updates correctly (EG if theres one player in game then the tables only has 1 player in it) and it keeps saying there's 2. ~XlAscensionlX [Graphic Design://Scripter://Developer://]
XlAscensionlX
#184529721Monday, February 29, 2016 6:56 AM GMT

Bump ~XlAscensionlX [Graphic Design://Scripter://Developer://]
XlAscensionlX
#184530568Monday, February 29, 2016 7:45 AM GMT

1 ~XlAscensionlX [Graphic Design://Scripter://Developer://]
XlAscensionlX
#184531023Monday, February 29, 2016 8:27 AM GMT

2 ~XlAscensionlX [Graphic Design://Scripter://Developer://]
XlAscensionlX
#184543665Monday, February 29, 2016 7:05 PM GMT

3 ~XlAscensionlX [Graphic Design://Scripter://Developer://]
TwistyTies
#184544123Monday, February 29, 2016 7:17 PM GMT

Well, when the game restarts just make the Survivor table empty. If money grew on trees... It would be as valuable as leaves. | Twitter: @TwisterRBLX
XlAscensionlX
#184545149Monday, February 29, 2016 7:47 PM GMT

@twister1976, I do, but however when it teleports them anytime after the first time it think it's teleporting 2 players ~XlAscensionlX [Graphic Design://Scripter://Developer://]
128Gigabytes
#184545340Monday, February 29, 2016 7:52 PM GMT

You are using or incorrectly. You have if ((x == y) or z) then end And what you want is if ((x == y) or (x == z)) then end
XlAscensionlX
#184545604Monday, February 29, 2016 7:59 PM GMT

if player.TeamColor == BrickColor.new("Bright bluish green") or player.TeamColor == ("Bright yellow") then end ^^ What's wrong with that? ~XlAscensionlX [Graphic Design://Scripter://Developer://]
TimeTicks
#184545943Monday, February 29, 2016 8:08 PM GMT

local alive = {} game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(char) char.Humanoid.Died:connect(function() if player.TeamColor == BrickColor.new("Bright bluish green") then player.TeamColor = BrickColor.new("Bright blue") for i,v in next, alive do if v == player.Name then table.remove(alive,i) end end end end) end) end)
XlAscensionlX
#184546954Monday, February 29, 2016 8:35 PM GMT

THANK YOU SO MUCH ~XlAscensionlX [Graphic Design://Scripter://Developer://]

    of     1