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

Is there a way to get all the attributes from the GAME?

Asked by 2 years ago

Is there any way to get all the attributes from the whole game? Not a Part or an other object, from the game!

You could loop through the workspace children for example and then loop through the attributes from those children but that wont get it from the entire workspace and I also want it from the entire game, ReplicatedStorage and others included.

I want to use this to search the entire game for a specific attribute. Thanks!

1 answer

Log in to vote
2
Answered by 2 years ago

Hello! I just want to mention that there is a thing called :GetDescendants(). I'm sure you already know this, but I thought I'd talk about it.

I have no idea how to use attributes since I'm not too familiar with them, but you can use this code:

for _, i in pairs(game:GetDescendants()) do
    -- code
end

To loop through every child in the entire game. :GetChildren() only checks everything inside the set parent, while :GetDecendants() is used to check everything inside the children as well. I'm not the best at explaining this kind of stuff, so you can refer to this link.

Ad

Answer this question