I have a table which stores winners for my egghunt but when I go to check if they are in the
table I can’t because the variable itself stores others in it.
For example I have my winners here which are organised in this layout:
Before I was doing this if EgghuntWinners[Player.Name] then
to check if a user is in a table but once I added extra data to the table this stopped working
and I was wondering how could fix this. Because I know that if EgghuntWinners[Player.Name][1] == Player.Name then
this wont work as it will just error because it can’t find Player.name in the table.
By the way, since it wasn’t addressed, the way you wrote your table ended up creating a mixed table instead. This is how your code was actually being evaluated:
Always make sure you read carefully what’s going on in your code and do a bit of debugging and researching if you’re unsure of what’s going on. EgghuntWinners[1] =/= EgghuntWinners[“String”]. You had your extra values outside the player table.