It doesn’t just happen with this plugin per se though I can see why you’d say that.
The plugin is just to reproduce the bug. I’ve seen other plugins with a similar issue.
I am technically calling :Destroy() on the object, and that’s what locks the Parent property, but then why even have a function like ChangeHistoryService:SetWaypoint(desc) if it’s going to mess things up?
Maybe I should put more emphasis on this function. It seems like the expected behavior is for this function to override the parent lock. If you comment out the parts where this function is called, it works a li
Waypoints are just points to return to, each time you make a change to the game set a waypoint before AND after making the change. If you press the blocky button, set a waypoint before AND after actually applying the changes, same with smooth.
I’ll admit I didn’t read that part, but this still occurs even when you do that.
Here’s a more mainstream plugin that has a similar issue with Ctrl+Z
(@Quenty’s class converter)
Steps to reproduce:
Make a model with some parts in it
Convert the model into a Folder
CTRL + Z
(optional) Perform any action that deletes the CTRL+Y stack. This happened to me by mistake. I don’t know what I did, but the CTRL+Y history got deleted and I basically lost the entire model. I lost a lot of structures on a map I was working on due to this.
It feels like this is something Roblox should fix on their end.
Hey, yeah, I saw your dm. I forgot to mention before, I tested it out and can confirm something weird is going on. I think the issue is that child objects aren’t being considered when changes are being made, or something along those lines.
When you set a waypoint and delete, create and parent objects it seems to get confused internally. It might be that you have to set a waypoint for every object you create and change, but that seems unlikely considering the example on the wiki shows a table of parts being updated.
Roblox staff might want to look into this or clear this up.
I’ve just had this issue, except it involves cloning a Sound object and setting its Parent. 05:15:13.425 The Parent property of Sound is locked, current parent: NULL, new parent ScreenGui - Server - Music Script:75
So it’s not just waypoints.
This is also unfortunate considering it breaks my backup music system.
This is also happening to me for a plugin I just created. Not sure if there’s any workaround, but if anyone decides to use this plugin then it might hinder their workflow. I seem to be getting the error every time I try to undo a change.
local ChangeHistoryService = game:GetService("ChangeHistoryService")
local Selection = game:GetService("Selection")
local PluginToolbar = plugin:CreateToolbar("Camera >< CFrameValue")
local ToCFrameButton = PluginToolbar:CreateButton("CameraToCFrameValue", "Convert the selected Camera to a CFrameValue.", "rbxassetid://6568277658", "Camera > CFrameValue")
local ToCameraButton = PluginToolbar:CreateButton("CFrameValueToCamera", "Convert the selected CFrameValue to a Camera.", "rbxassetid://6568277967", "CFrameValue > Camera")
ToCFrameButton.Click:Connect(function()
ChangeHistoryService:SetWaypoint("Camera >< CFrameValue: Starting")
for _, Item in pairs(Selection:Get()) do
if Item:IsA("Camera") then
local CFrameValue = Instance.new("CFrameValue")
CFrameValue.Name = (Item.Name ~= "Camera" and Item.Name) or "CFrameValue"
CFrameValue.Value = Item.CFrame
CFrameValue:SetAttribute("FieldOfView", Item.FieldOfView)
CFrameValue:SetAttribute("Roll", math.deg(Item:GetRoll()))
CFrameValue.Parent = Item.Parent
Item:Destroy()
end
end
ChangeHistoryService:SetWaypoint("Camera >< CFrameValue: Done")
end)
ToCameraButton.Click:Connect(function()
ChangeHistoryService:SetWaypoint("Camera >< CFrameValue: Starting")
for _, Item in pairs(Selection:Get()) do
if Item:IsA("CFrameValue") then
local Camera = Instance.new("Camera")
Camera.Name = (Item.Name ~= "Camera" and Item.Name) or "NewCamera"
Camera.CFrame = Item.Value
Camera.FieldOfView = Item:GetAttribute("FieldOfView") or 70
Camera:SetRoll(math.rad(Item:GetAttribute("Roll") or 0))
Camera.Parent = Item.Parent
Item:Destroy()
end
end
ChangeHistoryService:SetWaypoint("Camera >< CFrameValue: Done")
end)