im trying to spawn a block (with an other script) and delte it again with this script and it just keeps putting out error codes like the one in the titel
local Debris = game:GetService("Debris") local nta = "nothing got added yet" function lte2brickdestroy() workspace.lte1buttonscript.ChildAdded:Connect(function(instance) instance.Name = nta if nta == "lte2brick" then Debris:AddItem() end end) end game.Workspace.lead_to_exit1_button.ClickDetector.MouseClick:lte2brickdestroy()
game.Workspace.lead_to_exit1_button.ClickDetector.MouseClick:lte2brickdestroy()
game.Workspace.lead_to_exit1_button.ClickDetector.MouseClick:Connect(lte2brickdestroy)