Help with coroutine

I’m trying to add a powerup that when collided with will increase the players shooting speed. I’m using a coroutine to apply a waitforseconds to return back to the normal shooting speed. I can’t seem to work out what I’m doing wrong. Any help is much appreciated (I am very new to coding/programming)

Screenshot_5

Hi,

Please note, it’s better to copy/paste your code and apply the code fencing characters, rather than using screenshots. Screenshots are ideal for displaying specific details from within a game engine editor or even error messages, but for code, they tend to be less readable, especially on mobile devices which can require extensive zooming and scrolling.

You also prevent those that may offer to help you the ability to copy/paste part of your code back to you with suggestions and/or corrections, meaning that they would need to type a potentially lengthy response. You will often find that people are more likely to respond to your questions if you make it as easy as possible for them to do so.

Hope this helps :slight_smile:


See also;

This topic was automatically closed after 22 hours. New replies are no longer allowed.

Privacy & Terms