Check if PetName is in ModuleScript/Dictionary?
Asked by
4 years ago Edited 4 years ago
I made I post earlier today asking how to make a List in a script.
After some help and some yt videos I now know that I can use a module script or a dictionary
now I got the next problem,
this is an example of the dictionary I used
3 | [ "Giant Dog" ] = "SECRET" |
4 | [ "Giant Cat" ] = "SECRET" |
now let's say I have a pet inventory with 3 pets a "Giant Dog" a "Giant Cat" and a normal "Dog" dor example
I want to make a script that checks if the name of the pet is "Giant Dog" or "Giant Cat" then it shows a SECRET tag on it
here an example script of what I tried:
2 | if Rarities.FindFirstChild(rName) ~ = nil then |
3 | PetRarity.Text = Rarities.FindFirstChild(name) |
well ofcourse this didn't work
So I want to check if the name of the pet is in the Dictionary/module script but idk how