1 | while true do |
2 | for _, v in pairs (game.Workspace:GetChildren()) do |
3 | if v:WaitForChild( "Part" ) or v.Name = = "Part" then |
4 | v:Destroy |
5 | end |
6 | 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:
1 | while true do |
2 | for _, v in pairs (game.Workspace:GetChildren()) do |
3 | if v:WaitForChild( "Part" ) or v.Name = = "Part" then |
4 | v:Destroy() -- You also need to add brackets. |
5 | end |
6 | end |
7 | end |