Learn
Engine Class
ChangeHistoryService
Not Creatable
Service

Summary
Inherited Members

API Reference
Methods
FinishRecording
Plugin Security
ChangeHistoryService:FinishRecording(
identifier:string, operation:Enum.FinishRecordingOperation, finalOptions:Dictionary?
):()
Parameters
identifier:string
finalOptions:Dictionary?
Returns
()
Code Samples
ChangeHistoryService:TryBeginRecording
local ChangeHistoryService = game:GetService("ChangeHistoryService")
local Selection = game:GetService("Selection")
local toolbar = plugin:CreateToolbar("Example Plugin")
local button = toolbar:CreateButton("Neon it up", "", "")
button.Click:Connect(function()
local parts = {}
for _, part in pairs(Selection:Get()) do
if part:IsA("BasePart") then
parts[#parts + 1] = part
end
end
if #parts < 1 then
-- Nothing to do.
return
end
local recording = ChangeHistoryService:TryBeginRecording("Set selection to neon")
if not recording then
-- Handle error here. This indidcates that your plugin began a previous
-- recording and never completed it. You may only have one recording
-- per plugin active at a time.
return
end
for _, part in pairs(parts) do
part.Material = Enum.Material.Neon
end
ChangeHistoryService:FinishRecording(recording, Enum.FinishRecordingOperation.Commit)
end)

GetCanRedo
Plugin Security
ChangeHistoryService:GetCanRedo():Tuple
Returns

GetCanUndo
Plugin Security
ChangeHistoryService:GetCanUndo():Tuple
Returns

IsRecordingInProgress
Plugin Security
ChangeHistoryService:IsRecordingInProgress(identifier:string?):boolean
Parameters
identifier:string?
Returns

Redo
Plugin Security
ChangeHistoryService:Redo():()
Returns
()

ResetWaypoints
Plugin Security
ChangeHistoryService:ResetWaypoints():()
Returns
()

SetEnabled
Plugin Security
ChangeHistoryService:SetEnabled(state:boolean):()
Parameters
state:boolean
Returns
()

SetWaypoint
Plugin Security
ChangeHistoryService:SetWaypoint(name:string):()
Parameters
name:string
Returns
()
Code Samples
ChangeHistoryService:SetWaypoint
local ChangeHistoryService = game:GetService("ChangeHistoryService")
local Selection = game:GetService("Selection")
local toolbar = plugin:CreateToolbar("Example Plugin")
local button = toolbar:CreateButton("Neon it up", "", "")
button.Click:Connect(function()
local parts = {}
for _, part in pairs(Selection:Get()) do
if part:IsA("BasePart") then
parts[#parts + 1] = part
end
end
if #parts > 0 then
-- Calling SetWaypoint before the work will not cause any issues, however
-- it is redundant, only the call AFTER the work is needed.
--ChangeHistoryService:SetWaypoint("Setting selection to neon")
for _, part in pairs(parts) do
part.Material = Enum.Material.Neon
end
-- Call SetWaypoint AFTER completing the work
ChangeHistoryService:SetWaypoint("Set selection to neon")
else
-- Nothing to do. You do not need to call SetWaypoint in the case where
-- the action did not end up making any changes to the experience.
end
end)

TryBeginRecording
Plugin Security
ChangeHistoryService:TryBeginRecording(
name:string, displayName:string?
Parameters
name:string
displayName:string?
Returns
Code Samples
ChangeHistoryService:TryBeginRecording
local ChangeHistoryService = game:GetService("ChangeHistoryService")
local Selection = game:GetService("Selection")
local toolbar = plugin:CreateToolbar("Example Plugin")
local button = toolbar:CreateButton("Neon it up", "", "")
button.Click:Connect(function()
local parts = {}
for _, part in pairs(Selection:Get()) do
if part:IsA("BasePart") then
parts[#parts + 1] = part
end
end
if #parts < 1 then
-- Nothing to do.
return
end
local recording = ChangeHistoryService:TryBeginRecording("Set selection to neon")
if not recording then
-- Handle error here. This indidcates that your plugin began a previous
-- recording and never completed it. You may only have one recording
-- per plugin active at a time.
return
end
for _, part in pairs(parts) do
part.Material = Enum.Material.Neon
end
ChangeHistoryService:FinishRecording(recording, Enum.FinishRecordingOperation.Commit)
end)

Undo
Plugin Security
ChangeHistoryService:Undo():()
Returns
()

Events
OnRecordingFinished
Plugin Security
ChangeHistoryService.OnRecordingFinished(
name:string, displayName:string?, identifier:string?, operation:Enum.FinishRecordingOperation, finalOptions:Dictionary?
Parameters
name:string
displayName:string?
identifier:string?
finalOptions:Dictionary?

OnRecordingStarted
Plugin Security
ChangeHistoryService.OnRecordingStarted(
name:string, displayName:string?
Parameters
name:string
displayName:string?

OnRedo
Plugin Security
ChangeHistoryService.OnRedo(waypoint:string):RBXScriptSignal
Parameters
waypoint:string

OnUndo
Plugin Security
ChangeHistoryService.OnUndo(waypoint:string):RBXScriptSignal
Parameters
waypoint:string

©2026 Roblox Corporation. Roblox, the Roblox logo and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.