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

DoubleConstrainedValue.Changed

DoubleConstrainedValue.Changed

Oct 01 2018, 1:49 AM PST

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

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

Workspace.DoubleConstrainedValue.Value = 2