How to view localplayer children within ingame console?

Due to the nature of my module script, it is unable to run within studio, thus, I’m looking for a way to access the name of the playergui found within each player’s localplayer. I tried “print(localplayer. playergui:GetChildren()” but to no avail.

You have two choices, really:

  • Convert the table into JSON, then output that

    JSON method
    local HTTPService = game:GetService("HttpService")
    local Table = game.Players.LocalPlayer.PlayerGui:GetChildren()
    print(HTTPService:JSONEncode(Table))
    
    
    -- Or as a single line:
    print(game:GetService("HttpService"):JSONEncode(game.Players.LocalPlayer.PlayerGui:GetChildren()))
    
  • Iterate through the table and output each value seperately

    Iteration method
    local Table = game.Players.LocalPlayer.PlayerGui:GetChildren()
    for _, item in ipairs(Table) do
        print(item.Name)
    end
    
    -- Or as a single line:
    for _, item in ipairs(game.Players.LocalPlayer.PlayerGui:GetChildren()) do print(item.Name) end
    

ah thank you! i moved on from this issue, but regardless, i’ll mark it as solution for helping me!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.