i am pretty sure that if there is too many errors in the out put roblox studio will crash.
so i am making a car that when you touch a certain part of it that part will break off the car
and it works but after i get constant error messages saying it can't find attachment
now i dont want that error message to be fixed i just want
script.Parent.toucher.Touched:Connect(function(hit)
script.Parent.Anchored = false
repeat
script.Parent.Attachment:Destroy()
until
end)
to run untill an error message pops up

1 comment
Just call script.Parent.Attachment:Destroy() once, you don't need to destroy it million times. If you however need to catch some error, use pcall. You can also use FindFirstChild to check if the attachment is inside of script.Parent.