Change History Service Error

The new ChangeHistoryService method does not work. Recording returns nil.
Why is this happening?

local Recording = ChangeHistoryService:TryBeginRecording("Remove Sky")
					
if Recording then
	TweenService:Create(SkyBase.UIScale, TweenInfo.new(.3, Enum.EasingStyle.Exponential, Enum.EasingDirection.In), {
		Scale = 0
	}):Play()

	Element.Parent = nil

	task.wait(.3)

	SkyBase:Destroy()

	ChangeHistoryService:FinishRecording("Remove Sky", Enum.FinishRecordingOperation.Commit)
end
2 Likes

This should be in #help-and-feedback:scripting-support

Also having this issue - but also #help-and-feedback:scripting-support

2 Likes

The problem is that the new method does not work correctly yet; Destroy also erases the ChangeHistoryService data.

Solution:

SkyBase.Parent = nil -- or SkyBase:Remove()
ChangeHistoryService:SetWaypoint("Sky Removed")