Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Can I view and edit a table in a GUI?

Hello, Im new to using tables and Im wondering if you could display table data in a GUI. I also would like to know if you could add data to that table by pressing a button that will add to the table.

2 comments

0

yes

0

^

1 answer

If you'd like me to write you a Script showing you adding everything, or have one already I could configure it to have a button to add pieces to the Array (table). Yes, you can, this method works sometimes, but do it like this. Note: this is for a TextLabel

local Player = game:GetService("Players").LocalPlayer
local PlayerGui = Players:WaitForChild("PlayerGui")
local Gui = PlayerGui:WaitForChild("Gui").GuiLabel

local Array = {"Hello", "There!"}

Gui.Text = table.concat(Array, " ") -- " ", otherwise the Second argument, aks how you want to present the formation of conjoining the items inside of the array, this case we're asking to space.

Hope this works?

This discussion is preserved as it was. New answers, comments, and votes are closed.