menu refers to the return value of Menu:Create
Button
menu:AddButton adds a button component.
Parameters
menu:AddButton(title, description?)| Name | Type | Description | Required |
|---|---|---|---|
| title | string | The title of the component | Yes |
| description | string | The description of the component | No |
Example
client/example.lua
local menu--[[Menu]] = Menu:Create('Title', 'Description', 'top-right', '#fff');
menu:AddButton('Button', 'Description'):OnClick(function()
print('I was clicked!');
end);