Value exist but doesnt?!?!?

I need to find a specific textbutton

Value shows up as nil no matter what i do.
image
image
This is insane because output shows that the table has values. what am i doing wrong??

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

i have looked on dev hub, discord, google to no avail. I cant solve the problem because i dont know what im doing wrong here. Im a C# dev trying to do some stuff on rblx so i dont know everything on here.

May we see the entire code? Something could be wrong there

Your table.find probably doesn’t work if you put instances in the FrameList, the print only shows the name of the isntance, you gotta pass in the instance in table.find in this case

3 Likes
local yourTable = {}

for i,v in pairs(yourTable) do
   if v == NeededTextButton then
          -- i will be the number, and v will be the value. 
   end
end

Is that a table of Instances and you’re searching for strings? That’s not how it works, you have to search for what’s exactly there. If you want to find a TextButton instance, you need to search for the instance itself and not its name.

2 Likes

Wait, can you check if n is a string. Perhaps the key is a number and you are checking with a string

1 Like

image