DoubleConstrainedValue
*Nội dung này được dịch bằng AI (Beta) và có thể có lỗi. Để xem trang này bằng tiếng Anh, hãy nhấp vào đây.
Một instate được sử dụng để tạo một giá trị số có thể không bao giờ nhỏ hơn MinValue hoặc nhiều hơn MaxValue.
Tóm Tắt
Thuộc Tính
Ghi số cao nhất mà thuộc tính DoubleConstrainedValue.Value có thể.
Giá trị thấp nhất mà thuộc tính DoubleConstrainedValue.Value có thể.
Được sử dụng để giữ một giá trị số từ DoubleConstrainedValue.MinValue và DoubleConstrainedValue.MaxValue .
Sự Kiện
Lửa mỗi khi DoubleConstrainedValue.Value của DoubleConstrainedValue được thay đổi.
Thuộc Tính
Value
Được sử dụng để giữ một giá trị số từ DoubleConstrainedValue.MinValue và DoubleConstrainedValue.MaxValue .
Phương Pháp
Sự Kiện
Changed
Lửa mỗi khi DoubleConstrainedValue.Value của DoubleConstrainedValue được thay đổi.
Tham Số
Mẫu mã
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