It can be difficult to make plugins work nicely with users redoing/undoing things. While plugins can invoke the Undo/Redo methods and set waypoints, there is currently no way to know when the Undo/Redo methods are called. Having simple OnUndo and OnRedo events would be helpful!
Code example:
function OnUndo(waypoint)
print("Undo Waypoint " .. waypoint)
end
function OnRedo(waypoint)
print("Redo Waypoint " .. waypoint)
end
game.ChangeHistoryService.OnUndo:connect(OnUndo)
game.ChangeHistoryService.OnRedo:connect(OnRedo)