How do I get the children of Game (the DataModel)?
Things I've tried
for _,v in pairs(game:GetChildren()) do print(v.Name..'; '..v.ClassName) end --This results in an unknown error.
Now, if I try to do this to workspace:
for _,v in pairs(workspace:GetChildren()) do print(v.Name..'; '..v.ClassName) end --This actually prints out Workspace's children.
Any help would be appreciated.
My theory is that the DataModel is RobloxLocked
, so you can't do anything to it. To get all instances in a game, you'd have to get the children of all the services that contain anything.
Pretty much all you can do to game
is stuff like print()
(print(game)
, print(game.ClassName)
etc.)
In other words, you can't directly obtain a whole game's children.