Skip to main content

Creating Dropdown Menus

Creation Snippet

local Dropdown = Label:AddDropdown({
Options = {"Option 1", "Option 2"},
CurrentOptions = {"Option 1"},
Placeholder = "None Selected",
Callback = function(Options)

end,
}, "INDEX")

This is just a snippet, not all parameters are included
Replace INDEX with a unique identifier of the instance that is not repeated within other nested elements nested in the parent.
Basically, you can just call it the type of nested element since theres only one of these in your label/toggle.

Accepted Parents

Label, Toggle

Parameters

Options : table
The Options for the user to select.
Accepts unlimited strings for options.

Required : boolean NOT REQUIRED
Whether the user is required to select an option.

CurrentOption : table
The Table containing all currently selected options.
Passing this as a string is acceptable too.

MultipleOptions : boolean NOT REQUIRED
Whether to allow multiple options to be selected.

Placeholder : string NOT REQUIRED
The placeholder text when no options are selected. Defaults to --.

Special : number NOT REQUIRED
If not nil, the dropdown will have a well, special options list.
Current Options:

  1. Player The Options List will be all current players in the server.
  2. Team The Options List will be all the current teams in the server powered by Roblox.

Callback : function
The function that takes place when the user either selects another option or unselects an option.
Passed Parameters:

  • Options : table
    A table (not dictionary) with all the current selected options.

Returns

Table .Instances

  • A table of the actual Instances of the Element within Roblox.
  • Contains the dropdown selector thingy, and the Popup selection menu.