How do you use table.find on Module Script if thats even possible?

Im trying to make the script look for a specific thing in the table for example: You click a TextButton which is named 1 then you do table.find(table,TextButton.Name) but it always returns nil?

can you show the contents of the table?

what are you trying to achieve…?
Are you trying to get the index of table?
then you can do table[tonumber(TextButton.Name)]

I’m not sure what are you trying to achieve, but you could do something like this:

if table[TextButton.Name] then
    print("this is not nil")
else
    print("this is nil")
end
1 Like