SetWaypoint (Function)
From Goodblox Wiki
Jump to navigationJump to search
Locked: This item is locked. Attempting to use it will cause an error.
Function | |
---|---|
Syntax | SetWaypoint( String name ) |
Returns | n/a |
Description: | Sets a new waypoint which can be used as an undo or redo point. |
In Object: | ChangeHistoryService |
Example
In order for the waypoints to work correctly, you need to set one both before AND after you perform the action that should be able to be undone.
local changeHistoryService = game:GetService("ChangeHistoryService") local part = workspace.Part changeHistoryService:SetWaypoint("Setting part material to wood") part.Material = Enum.Material.Wood changeHistoryService:SetWaypoint("Set part material to wood")