Skip to content
This repository was archived by the owner on Aug 20, 2024. It is now read-only.

Commit 4ba1d8f

Browse files
committed
Convert to use new Recording API
Signed-off-by: RyanLua <80087248+RyanLua@users.noreply.github.com>
1 parent 14bc62f commit 4ba1d8f

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/Signs/PluginGui/GuiObjectPart.lua

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ function GuiObjectPart.new(
2424
local self = {}
2525
setmetatable(self, GuiObjectPart)
2626

27+
local recording = ChangeHistoryService:TryBeginRecording("NewSignPart", "Create a new SignPart")
28+
29+
if not recording then
30+
error("Could not begin recording data model changes")
31+
end
32+
2733
local camera = workspace.CurrentCamera or Instance.new("Camera")
2834

2935
local partSizeX = label.AbsoluteSize.X / 50
@@ -64,12 +70,12 @@ function GuiObjectPart.new(
6470

6571
Selection:Set({ part })
6672

67-
ChangeHistoryService:SetWaypoint("Insert new SignPart")
68-
6973
self._part = part
7074
self._surfaceGui = surfaceGui
7175
self._guiObject = guiObject
7276

77+
ChangeHistoryService:FinishRecording(recording, Enum.FinishRecordingOperation.Commit)
78+
7379
return self
7480
end
7581

0 commit comments

Comments
 (0)