Hey guys, I'm getting an error since I'm new to the playerson array thing I don't know much about it.
Here's the error "idx out of range" this error comes on line 332 when there is only 1 player and the player leaves.
That's what I use on line 332 : playerson.Remove(player.ID)
Any help will be appreciated.
You have to see if the playerson is null or not. I use that playerson too.
Use this;-
if(playerson.find(player.ID)!=null ) playerson.remove(player.ID);
If you use player.Name, you just need to change the ID to Name
Works, Thanks.