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

Changed

Fired whenever the CFrameValue/Value of the CFrameValue is changed. It will run with the new value being stored in the argument object, instead of a string representing the property being changed.

This event, like other changed events, can be used to track when an CFrameValue changes and to track the different values that it may change to.

For instance, this even may be useful in games that rely on CFrameValues to track game object DataType/CFrame positions and movements.

Note

Equivalent changed events exist for similar objects, such as NumberValue and StringValue, depending on what object type best suits the need.

Parameters

Name Type Default Description

The new value after the change.


Code Samples


CFrameValue.Changed

The below example, assuming all referenced objects existed, would print the CFrameValue’s new value each time it changed.

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

Workspace.CFrameValue.Value = CFrame.new(0, 20, 0)