while true do for _, v in pairs(game.Workspace:GetChildren()) do if v:WaitForChild("Part") or v.Name == "Part" then v:Destroy end end
This is a workspace cleaner. Every time it returns: end:4: Expected function call arguments after '(' What does this even mean?
You are missing an end and the brackets of Destroy. Change your code to this:
while true do for _, v in pairs(game.Workspace:GetChildren()) do if v:WaitForChild("Part") or v.Name == "Part" then v:Destroy() -- You also need to add brackets. end end end