This prints true
print(game.StarterGui.ScreenGui.Home.Contents.Archivable)
This prints an error
print(game.StarterGui.ScreenGui.Home.Contents.BrickColor)
This prints nil
print(game.StarterGui.ScreenGui.Home.Contents:FindFirstChild("Archivable"))
This prints nil
print(game.StarterGui.ScreenGui.Home.Contents:FindFirstChild("BrickColor"))
Using . or [] reports an error if it doesn't exist. :FindFirstChild() only looks for children, not properties. I just need to see if a property on any given object exists.
EDIT:
As shown in the comments, if object:IsA("GuiBase") worked for what I was looking to do.

8 comments
There's no way to do this via a script, and no reason to. Just look on the wiki.
Well, I suppose you could use pcall, but there's still no reason to bother.
pcall is the only thing I can think of.
I am using a recursive loop to check if all the objects and their children have a certain property, and if they do, change it.
Instead of checking for the property, just check what object it is. Then change the property if it's the correct object.
Ya I just figured I'd see if this is something that exists in Rbx.Lua before resorting to that. I'll just have to check if each object is any variation of a GUI.
You can do object:IsA("GuiBase"). It will return true if it's any GUI object.
OK thanks, that worked!