79331963

Date: 2025-01-06 02:50:32
Score: 1
Natty:
Report link

I think that the problem might come from your 'pipe' prefab. Notice how on the tutorial you're following, the pipes are made with three different parts: top, bottom, and middle.

The middle part is the one that naturally should have the PipeMiddleScript.cs script attached to it. This script needs a collider component to function correctly, but that collider must be attached to the same object as the script. Currently, it seems like your collider is attached to the parent object of the middle part, which is the pipe prefab itself.

To fix your bug, make sure that the middle part has both the collider2d component and the PipeMiddleScript.cs script.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: user29066252