Code:
script.Parent.Touched:Connect(function(hit)
if hit:IsA("Part") then hit:Destroy() end
end)
Idk what's happening but for some reason this line of code won't destroy everything that it touches.
script.Parent.Touched:Connect(function(hit)
hit:Destroy()
end)
I've already tried it with this and the results were the same. It can only detect Player touches

10 comments
Where is the script located? Inside a part? Inside the Player?
my guy it's in the part
Have you tried checking the classname
Isn't that the same as the first piece of code i mentioned using?
:IsA checks for the classname. Doing :IsA() and Instance.ClassName is both the same thing (from my knowledge)
You can't use Touched to detect if parts are touching. If your parts have CanCollide on, you can use :GetTouchingParts(), but if not you'll have to use a more complicated method to detect this.
wait let me try that
Could you explain this method please?
is your script local?
Nope