Why does my variable code not work?

Can someone please have a look at my code and tell me why it isn’t working. It seems like the ‘if block’ isn’t responding to the true and false variables.
Here is my code


when I click whale 1 it shows the text message but it doesn’t stop.
Thanks

1 Like

while objects move on path they can’t stop with if else code instead use this block when you want stop move object.
image
have great day ! :slight_smile:

2 Likes

Ok thank you here is my new updated code:

Is there any way to make ‘Whale 1’ stop and then start again.
Thanks again.

Hoi @Sam_nelson,
These Coblocks ensure that a whale stops and then starts swimming again:

Hope it works for your whale too.:whale:

2 Likes

Thank you for this @pavlina. I have chosen to use this simpler code instead though.

Thank you again @HenryHuy and @pavlina for your help with this code.

:slight_smile: