Help with a two player game sequel

I simply need help implementing the whole, two players need to complete the level to beat it.
Here is the project
https://snap.berkeley.edu/project?user=leothemisfit&project=Inverted%20II

a good title might be, "Help with 2-Player game" or something like that.

The real thing I need help with is making it to where both players must complete the level.

Maybe make a variable to this? When player 'A' will on the end, variable will set to '1' but to finish level variable must have value ,,2''- then when player 'B' will come on the end.

Something like that:
image

Oh wow, I can't believe I didn't think of that, thanks so much man, I really appreciate it.

What if player B made it first? It would just move on without waiting for Player A. Maybe use a [scratchblocks]
change [var] by (1)
[/scratchblocks]
block instead.

heh, wait... I'll correct in the moment

It should be:

(thanks @joecooldoo for correct)

that also wrong use the change blocks else player b can still finish before prayer a.

b can only win if var is 1, which only happens if a is touching the end. (a can only win if var is 2, which only happens if b is touching the end.)

They are talking about

Did I say something against that?

You didn't answer my question.

Only one player can beat it in your explanation. So,

Reason to use change blocks:

No, read this:

They don't want only one player to win. Both players need to be at the end. Did I not understand that correctly?
EDIT: 1 means a made it, so when b makes it and var is 1, that means both players made it.

Oh, it looks like I'm the one misinterpreting, sorry.

At the begining of the game init var to 0
When a touch the end, add 1 to var (and stop the script?)
When b touch the end, add 1 to var (and stop the script?)

in another script, wait until var = 2 and finish the level

Hey, thanks for all your guys help, I will try all of these methods you told me.

https://snap.berkeley.edu/project?user=leothemisfit&project=Inverted%20II%20Concept