I have two tables. Both are just normal tables. Both contain 1 player instance (the same one).
Team = {
Players = {}
}
Party = {
Players = {}
}
So basically I print both tables, before removing the player from the Team table. Both print out that I have a player (same player) in each table. When I remove the player from Team, and print both tables again the player some how got out of the party table too? I don’t know what is happening??
for i = 1,#Team.Players do
if Team.Players[i] == player then
table.remove(Team.Players, i)
break
end
end
That wasn’t why. It was because somewhere in my 1000 lines of code I put Team.Players = Party.Players because like I wanted all the players in the Party table to go into the team table, and somehow the tables got like connected so whenever I changed something with Team.Players, party.Players also changed.
After looking for a hour and a half I posted this then I was like okay, I will go make a sub and then it randomly came to me.