Why can't the ball collide with the blue team's soccer goal?

But yellow team’s soccer goal is working!

football table game

Hi @Liao_Verton,

that’s an amazing soccer game! :slight_smile:

About your collision issue: you are doing everything correct, but you are overwriting collision handlers for your ball. Items in CoSpaces can not have duplicate event handlers.

At the start of your script, you set up a collision handler for the item 足球門B on the football. Then you set up an event handler for 足球門Y on the football. This new event handler overwrites the old event handler, making only 足球門Y an accepted collision.

Here’s how you can fix this issue:
-Set up event handlers on the goals themselves, not the football

For the yellow goal:

For the blue goal:

Hope this helps!

Thanks for your reply, this is a very constructive suggestion.

1 Like