How can i check if a string is somewhere in a table

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    To check if someone is in my friend list or in a table
  2. What is the issue? Include screenshots / videos if possible!
    idk how to check if something is somewhere in a table
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub? no

you can steal the code from an admin thing or something

Are you looking for table.find()?
example script using it:

local Table = {
"Cheese"
}

if table.find(Table,"Cheese") then
    print("Cheese is found")
end

If youre using an array(Table in short to make it easier for you)

if table.find(array,"Something") then

print("Found")
end

If youre using a dictionary

if Dictionary["Something"] then
print("Found")
end

Bracket syntax isn’t required for string keys.
if Dictionary.Something then

1 Like