So for context, I'm trying to make an alternate version of a projectile attack to where if you hold down a certain button, it'll make the projectile lob towards enemies and monitors similar to how Fang lobs his bombs at you in his boss fight. If we look at the code above, it should work.
However, in execution, it doesn't.
My theory is that it may be affected by this other bit of code which is supposed to determine where the bomb goes based on certain situations. I have not yet to code it based on the homing shot because I'm still kinda new to lua. If anyone knows what to do for homing shots, let me know!
EDIT: I don't really mind this too much since it can also be used as a way to lock your camera onto enemies so that your shots can be slightly more accurate, but I'm just saying that for sake of consistancy, it would be nice for the bombs to home in on the target.