OnValueChanged||doc136707

September 20, 2022

Format

local event = Slider:GetEvent("OnValueChanged")

Describe

Triggers an event when the current value in the slider control changes.

Callback function parameters

Type name introduce
Slider slider current window

Code example

--Create a slider control
local slider = UI:CreateGUIWidget(Enum.WidgetType.Slider)
slider.Parent = UI.Root

local event = slider:GetEvent("OnValueChanged")
event:Bind(function(slider)
    print("slider value changed! ", slider.Value)
end)