IntConstrainedValue

Visualizza obsoleti

*Questo contenuto è tradotto usando AI (Beta) e potrebbe contenere errori. Per visualizzare questa pagina in inglese, clicca qui.

Obsoleto

Un IntConstrainedValue viene utilizzato per memorizzare un valore che non può essere mai inferiore a MinValue e non può essere mai superiore a MaxValue.

Sommario

Proprietà

Eventi

Proprietà

ConstrainedValue

Nascosto
Non Replicato
Lettura Parallela

Tieni un valore Integer tra IntConstrainedValue.MinValue e IntConstrainedValue.MaxValue. Rimpiazzato da IntConstrainedValue.Value, ma ancora funzionale.

MaxValue

Lettura Parallela

Il numero più alto che la proprietà IntConstrainedValue.Value può essere.

MinValue

Lettura Parallela

Il numero più basso che la proprietà IntConstrainedValue.Value può essere.

Value

Non Replicato
Lettura Parallela

Utilizzato per mantenere un valore intero tra IntConstrainedValue.MinValue e IntConstrainedValue.MaxValue .

Metodi

Eventi

Changed

Sparato ogni volta che viene modificato il Valore di IntConstrainedValue.

Parametri

value: number

Campioni di codice

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.

IntConstrainedValue.Changed

local function valueChanged(newValue)
print(newValue)
end
workspace.IntConstrainedValue.Changed:Connect(valueChanged)
workspace.IntConstrainedValue.Value = 2