Baseplate being destroyed

Hey! I have a sandbox game about welding parts together or tethering them, and sometimes, when the spawnables/blocks are deleted, the baseplate is also deleted.

local function clearMap()
	for _, v in pairs(workspace.Structure:GetChildren()) do
		v:BreakJoints()
	end
	task.wait()
	for _, obj in ipairs(workspace.Spawned:GetChildren()) do
		obj:Destroy()
	end
	for _, obj in ipairs(workspace.Blocks:GetChildren()) do
		obj:Destroy()
	end
end

Haven’t been able to reproduce this issue on my own. The baseplate is inside the Structure folder.

Try not to use deprecated functions v:BreakJoints().
image

How to replace :BreakJoints()

2 Likes

i dont see whats wrong with using them, since it works, but ok

The base panel usually has a true value for the locked property, and you can set it as a condition in the script. (I’m using a translator).

update: this didnt work since the function does the exact same thing as the deprecated one

Would it be possible to move the baseplate out of that folder? Then see if that fixes it. Unless, ofc, u NEED it in the folder for ur game purposes

1 Like