Im new to MakeCode and I want to know how I can make my sprite detect when it got hit by my projectile.
Welcome to the Makecode forum!!
This block from the Sprites tab should be what you’re looking for:
If you are using one of the “create projectile…” blocks to create your projectiles, simply change the second dropdown menu to the sprite kind “projectile” like this:
It should work! Good luck, and feel free to ask any more questions you have!