Hello!
I want to make a script but im having truble. I want to make a part1 destroys part2 and not any other parts. Im trying to make a lawn mower that only destroys the grass and not any other part.
Thank you for reading!
Hello!
I want to make a script but im having truble. I want to make a part1 destroys part2 and not any other parts. Im trying to make a lawn mower that only destroys the grass and not any other part.
Thank you for reading!
If the grass is named something like “Grass” you can just do a simple name check
if partToDestroy.Name == "Grass" then
dosomething()
end
part.Touched:Connect(function(hit)
if hit:IsA("Part") and hit.Name == "Grass" then -- remove IsA if u want
hit:Destroy()
end
end)