When I shoot I use InvokeRepeating to continuously shoot until I let go of space. In game there is a powerup which decreases this repeat rate but I need to stop shooting then star shooting for it to actually make an effect and when the repeat rate variable in the code is set back to normal it doesn’t take effect until I stop shooting and start shooting again.
How would I fix this so that it updates without me having to stop shooting and start shooting agian?