If the value for lastbrickspawned was brick288. Then it would have destroyed brick288 in workspace.
local bricktodelete = script.Parent.Parent.Parent.BottomBar.Models.LastBrickSpawned.Value
script.Parent.MouseButton1Down:Connect(function()
workspace.bricktodelete:Destroy()
end)

3 comments
Remove workspace when deleting the part, maybe that helps.
why to remove the workspace, is it even possible?
Do
workspace[bricktodelete]:Destroy()