Question: Hey, I'm trying to make a basic hockey style game.
I have the basic physics working with the pitch, a player, an opponent, and a ball.

I'm struggling to figure out how I can allow the ball to travel into the goal 
while keeping the player and opponent from going into the goal.

Basically the opponent follows the ball, and the player is controlled by user input.
so there are two restrictions I need.

I need to create a shape that only the ball can go through... is this even possible?
Maybe I can sleep the opponent if the ball passes the goal line?

Am I going about it the right way?

Player1 can only move around in the red box
Player2 can only move around in the green box
The ball can move around in the outer blue box

![playing field layout](https://i.stack.imgur.com/DMBvb.png)

Answer: 
why don't you use simple collision detection?

if the object that moves over your hockey field is of type player and his position/hitbox collides with the goal, you change his position back to the line, so he possibly can't intersect with the goal. 

if the type of object is not a player you simple let the object pass
Well, you don't allow the player to leave the playing field to the left or right do you? So You just need to do that same logic for the goal area for players.