Dropdowns

Changing Dropdown Values

To change what a dropdown has, use this.

Dropdown:SetValues({"one", "two", "three"})

To create a dropdown, use this.

local Dropdown = Tabs.Main:AddDropdown("Dropdown", {
    Title = "Dropdown",
    Description = "Dropdown description",
    Values = {"one", "two", "three"},
    Multi = false,
    Default = 1,
    Callback = function(Value)
        print("Dropdown was changed:", Value)
    end
})

The Value returns the selected value.

Change local Dropdown to a different variable name every time. It can be anything.

Dropdown (name of dropdown) is saved in the Options variable.

You can try to remove it, but I've never tried to.

You can get the value anywhere simply by using this: (Put your variable name)

Or, whatever you put as the name of the toggle.

You can check when the dropdown is changed, but Callback does the same thing.

To set the value of a dropdown, use this.

Multiple Dropdowns

To create a dropdown with multiple values, use this.

Change local MultiDropdown to a different variable name every time. It can be anything.

MultiDropdown (name of dropdown) is saved in the Options variable.

You can try to remove it, but I've never tried to.

Information

Multi Dropdowns are super annoying. It returns the Value of every Value and if it's true or not.

An example is shown below.

To get the value of something, simply use

Or, whatever you put as the name of the toggle.

This will return "true" if it's true.

Functions

You can check when the multi dropdown is changed, but Callback does the same thing.

To set the value of a multi dropdown, use this.

Last updated