Cant destroy a projectile

Hey there i got a small issue. A got a gun and I got projectile class (also BP versions).I am spawning a projectile each time when player presses the left mouse button, and its spawning just fine. However, i want to implement destruction, each time when projectile gets spawned, after 1 second i need to destroy the projectile.But i am facing some problems . Please someone help ))))

Use:


TempProjectile->Destroy();

If you’re using a timer to destroy the projectile, why not using *SetLifeSpan *(AActor::SetLifeSpan | Unreal Engine Documentation) in the first place. No need for a timer and an extra function.

Thank you very mush Dude, that solved my issue. LOVE people like you!!!

Holy moley maaan , I wish you will live a long life , that worked perfectly <3