the script i made keeps throwing errors at me and i try to fix them but it doesn't work. I'm trying to find the path to a specific text area so that people with the vip pass won't see the message. i know it sounds weird that i need to find the path to a gui i made myself, but i made it where all gui objects move into different areas (e.g. game.StarterGui.example.stuff to game.StarterGui.example.oof)
for i,v in pairs(game:GetDescendants()) do if string.find(v.StateType, Text) and v.Text == "gvbadfuyhvbhdu" then print(v:GetFullName()) end end
Try using the IsA Instance method or just by checking the ClassName Instance property.
Examples:
if v:IsA('GuiBase') the -- Do Thing end
or
if v.ClassName == 'ScreenGui' then -- Do Thing end
You can use v:IsA("ClassName")
to check if v
is of a certain class. In your case, your class name would be ScreenGui. If you're looking to find any textlabels, it would be TextLabel. If you don't know what the class name of something is, you can see it in the properties of said object.