This script was working before but somehow it broke and I don't know if it's a bug or maybe I deleted something by accident (wich is something that happened before)
I also made the collisions for mobs bigger in case that was the problem 'cause I changed the sprite and the size of it
Thanks for any help given c: