Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is my .Touched event not recognizing collision with other parts, but only with my player?

Asked by 2 years ago
local function destroyParts(hit)
    if hit : IsA("Part") then -- Checks to see whether or not part touched is a part
        print(hit)
        hit.Anchored = false -- Unanchor parts
    end
end

wave.Touched:Connect(destroyParts) 

The part I am using is a Union and everytime it passes through another part - cancollide is disabled - the parts that are touched are uneffected. The anchored property is still checked on the other parts.

I have another line of code that kills the player when it touches the player and that works fine. So what am I missing here?

For information purposes, "wave" is: local wave = script.Parent

0
Is "Hit" going in the console? If not, it probably has something to do with your if statement. if it is, then it might have something to do with line 4. XRed03 17 — 2y
0
There's something with anchored parts and uncancollide parts that don't let them fire touched events. Something with PhysicsService might work. RAFA1608 543 — 2y

Answer this question