Skip to main content

FollowProperty

Tracks property changes and propagates updated userdata to states.

TypeSinceScoped
Declaration0.0.3No

Constructor

[FollowProperty(PropertyName : string)] = Value

Usage

Using it as a constructor index, declare FollowProperty() with a string parameter matching the property name you want followed, and set the value to the value you want updated.

local CurrentColor = Value(Color3.fromRGB(255, 255, 255))

New(MyObject, {
[FollowProperty "Color3"] = CurrentColor, -- When Color3 property updates, it will set CurrentColor to the new value
})

MyObject.Color3 = Color3.fromRGB(50, 50, 50) -- This will be reflected in CurrentColor