Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to search for a specific word in the entire game?

Asked by
ThKSO 0
3 years ago
Edited 3 years ago

I need help with finding a specific word in all the objects inside my game, counting Models, Scripts, TextLabels and et cetera. I would like to know if there is a script that could help me doing this.

Not telling for anybody to script it for me, but I would like to know if there is indeed something about this on where I can do it.

(ps. This means mostly that I want to check inside the properties if it ends up being in TextLabels and alike.)

0
Yes, I have tried CTRL + Shift + F and CTRL + Shift + X, so I am resorting to scripts in case there is no other way to do it. ThKSO 0 — 3y

1 answer

Log in to vote
0
Answered by
sleazel 1287 Moderation Voter
3 years ago

For workspace you could use:

for _, element in pairs(workspace:GetDescendants()) do
    if element.Name == "something" then
        print("found")
    end
    --use something like this to check in textlabels
    if element:IsA("TextLabel") then
        if element.Text == "something" then
            print("found in textlabel")
        end
    end
end

This will however not check the properties, except text labels text. You may need to add more checks like the one for TextLabel I provided. Similar script should be done for playergui. And for search inside scripts, you can use SearchAll option.

Ad

Answer this question