How to make piercing attack and cooldown for normal attack?

So, i want to create a cooldown for one of the attacks that my character does. Is it possible?
I also need advice on how to create a pierce attack, if possible.

2 Likes

For the cooldown you would just use a timer hooked up to a switch. Lets say the attack was the mouse. You click the mouse which inputs it into a switch which will turn itself off and will also input it into a timer. The timer whatever you set it to, will then turn the switch back on.

1 Like

For the pierce attack I would use a certain amount of raycasts, a raycast for each target. Make sure the raycast DOES NOT have the “stop at first object” enabled. Whatever key you would use for that would just cast the raycast and if the raycast its send a message to whatever the raycats target was and make it deal damage or whatever it would do. Make sure the message is set to send to last raycast hit. I believe this should work if you need me to make a example let me know.

1 Like

thank you! This really helps.

1 Like

Can you explain what type of attack the piercing one is? If it’s a projectile you can make it not solid and still have collisions enabled. For something like a sword stab, I would use a hitbox like in a typical game. If you’re confused about anything feel free to @ me :llama:

Thnaks, it was a projectile.

1 Like

Use this example:

1 Like