Although I am not sure how to clean vehicles, I can help you with cleaning hats and tools. That's generally easy to do.
3 | for i, v in pairs (game.Workspace:GetChildren()) do |
4 | if v:IsA( "Hat" ) or v:IsA( "Tool" ) |
7 | print ( "Place cleaned." ) |
The script scans the game for any hats or tools, and if it is found, it is deleted. It does this every 10 seconds, but you can change the interval by editing the number next to the wait()
function (Line 2). The print command (Line 7) is optional but very useful for testing it.