Did they change something? player.Team returns nil now… in all my code.
I can do…
player.Team = game.Teams.Player1
and the player does in fact join the Player 1 team but if I do…
local PlayerTeam = player.Team
PlayerTeam is nil
This all worked find and dandy yesterday.
“Team” was there under player just yesterday and used it a lot. Now I just have TeamColor but no Team
Team will return nil if the players isn’t in any team.
thanks but…
It used to return “NewPlayer” when the player wasn’t on a team.
Now it returns nil even is the player is on a team
This is a little unrelated to the topic at hand, but how do you get that list to come up of all the properties of a given object?
OK, got it fixed. Sorry, your right. I had created a Team called NewPlayer a long time ago. All new players were set to this team until they joined another Team. I dont see where I set this with any script so I assume the engine assigned all new players to the first team NewPlayer. Now, players were not being assigned to any team and like you pointed out, player.Team was returning nil. I had to set “AutoAssignable” to true for the NewPlayer team in order for new players to be on the NewPlayer team. I definitely didn’t have AutoAssignable set to true in the past but today I had to. I think it was automatically assigning new players to the first team before today. No problem. Sorry for the useless post.
When I create a breakpoint in the code and the code stops there, I can just hover my cursor over the object and it gives me its properties. Really useful with big tables
Thanks a lot. My game uses HUGE table structure so I will definitely be using this.