Search Unity

Wait for seconds not working

Discussion in 'Visual Scripting' started by kotm8, Jan 7, 2021.

  1. kotm8

    kotm8

    Joined:
    Jul 30, 2020
    Posts:
    1
    I am using unity bolt to create a school project and ran into a problem while using the wait for command.
    The wait for seconds block isn't waiting for any seconds it looks like it's ignoring it.
     

    Attached Files:

  2. Kellyrayj

    Kellyrayj

    Joined:
    Aug 29, 2011
    Posts:
    936
    Heyo! I see maybe two problems that you can check.

    1. If the scene changes and you can watch the little circles flow then you are right, it's ignoring the wait for seconds and it might be due to the unscaled time checkbox.
    2. If you can't switch scenes, then I'd check to make sure the gameObject actually is set to the "platform" tag.

    One more thing you could do is switch out the "WaitFor" unit with a "Timer" unit which doens't require a coroutine.
     
  3. yolostudio

    yolostudio

    Joined:
    Aug 20, 2020
    Posts:
    10
    Agree with @Kellyrayj
    @kotm8 First of all, you should verify if your level2 scene can load or not.
    Another note, make sure your OnCollisionEnter2D node is marked run as Coroutine
    check-coroutine.png

    If you want to get more help, you can join our Discord Server then send your tutorial request to #requests channel in BOLT TIPS & TUTORIALS category.