Is pending kill by function?

Hi I want to set a box rotating that when player steps on dissapears and make you goin on to the next level.

It works but my set up tells me that I have a blueprint error and is this:

this is my set up:

Can you please post an image tutorial of what I have to do in order to remove that error?

Thank you so much this looks simple but I can’t find a clue of what I have to do…

Hi there. In the image that you’ve shown, at the moment you’re only destroying the component (the variable Static Mesh). When your update/tick function runs, it expects for the Static Mesh variable to still be alive. When you use the “Destroy Component” function, you’re only killing the Static Mesh variable. The DestroyComponent function destroys a component of the actor; not the actor itself. This means that the actor will still run it’s functionality such as the Event Tick. The next time the actor ticks, it will call the AddRelativeRotation function on the Static Mesh variable which is now either pending kill or dead; this is why the error is occurring.

If you want to destroy the actor when the player collides with the box, you will need to use the [DestroyActor function][1]. This destroys the actor completely. This way, the tick event won’t occur and these errors shouldn’t occur.

Thank you so much for that clever explanation, this helped me a lot!

I didn’t realize I was destroying component instead of actor and that was the troubleshoot.

Thanks for your help! Im glad to see that there’s support in this community and I hope someday could do the same for you!

Greetings from Spain

No problem. Good luck with your project!