Train Game - Help

Hey, there!

I’m making a train game where you need to control the gate-thingy so cars and trains will not crashed together.

I want to the train comes from the bottom of screen and go to top of screen with tween behavior. When the train at the top of screen, it’ll wait for a few seconds, then it’ll do the same process (moving from bottom to top).

But what I saw is isn’t what I want. Here’s some image for reference.

trainPos1
The train position when on bottom. (Y = 877) (Ignore the second lane)

trainPos2
The train position when on top. (Y = -287) (Ignore the second lane)

The codes

Hope someone can help me, thanks! :smiley:

You don’t need to use the line: "The Y position of Main_Train>877. It’s useless.

1 Like

I’m not sure tweening is a good idea in this situation, but either way, you should remove old tween before starting another, it helps sometimes. :slight_smile: