How to do if statements intirly

i just can’t find it so if anyone can help that got it to work any way thank you

Screenshot 2024-04-11 184042
this is it i nee d a if statement at the top

Hi, the event blocks work like if-statements: If all the conditions in your block are met, the actions will be triggered from top to bottom.

can you explain it like I was dumb cause I don’t understand?

The event blocks work as an if-statement by default. On the left side are the conditions and on the right side are the actions. You can read the event block you have posted like: If ‘Return key is pressed’ and ‘Touch or Left mouse button is down’ and ‘The cursor/touch is on ConnectButton’ then do what is on the action side starting with the first action in the list.
So your condition is a bit unusual as it requires to press the Return key and click mouse left at the same time. The trigger once condition makes it so that the key press and the mouse click is only registered for one frame.

If you want to give the option to left click or to press return key to trigger the same action, there is an OR-condition you could use.

1 Like

well i am trying to go off of a example and here is the piture
Screenshot 2024-04-12 095800
so, I don’t know how to do that.
Se how it says if one of these conditions is true
that is what i need or does it not need that

Ah, okay. This is the OR-condition I have mentioned above. Go to: Add condition → Other conditions → Event and control flow → || Or

thanks, but one last thing how do I get the one in the picture named If all of these conditions are true.

That’s the ‘& And’-condition in ‘events and control flow’.