I am trying to find the index value of Hit.Parent, inside of a list of players. However, it returns me nil instead of the index value.
local Players = game.Players:GetChildren()
RedSide.Touched:Connect(function(Hit)
print(table.find(Players,Hit.Parent))
end)
Any ideas on how to get the index value of this working properly?
Thanks!

3 comments
Hit.Parent, in this context, refers to the Character, not the Player Object. Use Players:GetPlayerFromCharacter(Hit.Parent) instead.
Also, Players:GetPlayers()**
Thanks!