Skip to main content

LockValue

Permanently locks a Value state against future writes.

TypeSinceScoped
Utility0.3.3No

Constructor​

LockValue(Value : Value)

Only Value states can be locked. Locking is irreversible.

Usage​

Sets an internal lock flag and destroys the value's reactive backend. Afterward, assigning .Value errors.

local MyValue = Value("Peach")

MyValue.Value = "Starfruit" -- Ok

LockValue(MyValue)

MyValue.Value = "Kiwi" -- Errors: locked