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

How To Add A String To A Table Everytime You Click A Gui?

How Do You Do That???

1 answer

✓ Accepted answer

The table.insert function is perfect for this. You will also need to know how to handle events, because the MouseButton1Click event will fire everytime a specified GuiButton is clicked.

local button = -- reference to button here
local tbl = {}

button.MouseButton1Click(function()
	local stringToInsert = ""
	table.insert(tbl, stringToInsert)
end)

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