Ctrl+Z Parent property Locked

Issue Type: Other
Impact: Low
Frequency: Sometimes
Date First Experienced:
Date Last Experienced:

Reproduction Steps:

  1. Run this studio plugin: https://pastebin.com/raw/uhp2aMdj
    Here’s the latest version of the plugin: https://pastebin.com/raw/VVVrip8S
    I don’t know why I can’t reply on the forums right now but it keeps throwing a 403 error.

  2. Paint some terrain near the cords 0,0,0 (or generate some terrain)

  3. Hit the Blocky button
    image

  4. Hit the Smooth button
    image

  5. CTRL + Z

Another way to reproduce this: Ctrl+Z Parent property Locked - #5 by ToldFable

Expected Behavior:
I expect the blocks that were removed to come back

Actual Behavior:
Studio locks the parent property of the blocks, so everything’s just deleted

1 Like

Are you sure this is a studio issue and not an issue with the plugin?

3 Likes

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

1 Like

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.

1 Like

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:

  1. Make a model with some parts in it
    image

  2. Convert the model into a Folder
    image

  3. CTRL + Z

  4. (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.

1 Like

Could you update the source code following what I said, in the way you tested it, so I can check that out?

I’ve updated the original post to include this
Here’s the latest version of the plugin: https://pastebin.com/raw/VVVrip8S

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.

Thanks for the report! We’ve filed a ticket to our internal database and we’ll follow up when we have an update for you.

4 Likes

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.

Plugin link:

https://www.roblox.com/library/6568367847/Camera-CFrame

Plugin code:

Summary
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)
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.