PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience

IntConstrainedValue.Changed

IntConstrainedValue.Changed

Oct 01 2018, 1:50 AM PST

The below example, assuming all referenced objects existed, would print the IntConstrainedValue’s new value each time it’s changed. In the example below it would print 2, assuming it’s within IntConstrainedValue’s MinValue and MaxValue range. Otherwise there will be no change.

Workspace.IntConstrainedValue.Changed:Connect(function(NewValue)
    print(NewValue)
end)

Workspace.IntConstrainedValue.Value = 2