Hi, I need help with a script. When in the area is more than one object, need to delete one, but I either delete everything or no one.
I also wanted to make both the area and the part anchored, but in this case script does not work.
Area - anchored part, Part - select all parts in folder.
Please, help!
local Part = workspace:WaitForChild("Part"):GetChildren()
local Area = game.Workspace.Area
Area.Touched:Connect(function(hit)
if hit.Name == "Part" then
Part:Destroy()
end
end)

1 comment
You got it right, thank you.