Help Needed: Problems destroying icon (pls)

I have a script in which if a player is frozen, then a ring appears around them and an icon appears above their head. If they die or get unfrozen, they are supposed to be destroyed. While the ring does disappear, the icon does not. My script reads as follows:

To create the effects:
Ongoing each player
Team 1

Condition: Has status(event player, Frozen)==True
Actions: Create icon(all players(team of(event player)), event player, sad, visible to and postion, blue, true) Create effect(all players(team of(event player)), ring, blue, event player,3, visible to position and radius)

For removing these effects I have two different rules:
Rule 1:
Ongoing each player
Team 1

Condition: Has status(event player, frozen)==false
Actions: Destroy effect(last created entity)
Destroy icon(last created entity)

Rule 2:
Ongoing each player
Team 1

Condition: Is dead(event player)==True
Actions: Destroy effect(last created entity)
Destroy icon(last created entity)

Try assigning a variable to last created entity for each one right after you create them, then destroy those variables instead of the last created entity.

also i would recommend instead of having 2 rules to destroy them to use Or.

1 Like

Ok I’ll try that thx for responding, sometimes the workshop forums feel like a wasteland.