OnValueChangedEvent

Constructor:

OnValueChangedEvent()

Description

Triggered when the object is clicked or touched.

Examples

Create a 2D GUI container under the StarterUI, and add a UiSlider under the container. Create a client script under the scrollbar and add the following code. It will output "scroll" when the position value of the scrollbar changes.

local uiscr = script.Parent
uiscr.OnValueChangedEvent:Connect(function() -- click the UiButton to trigger an event
    print("scroll")
end)