How to make a effect dissapear when a mob dies

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

iTSZalk

Member
Apr 3, 2021
2
0
1
I was wondering how to make a effect dissapear when a mob dies. Im making a ability that summons a cat, and you get invisibility to you and your armour until the cat is killed or someone attacks you. I have made this code and I think it should work, but then I kill the cat and it doesn´t clear me the effect.
upload_2021-4-3_19-20-42.png
 
You only removed the invisibility from the victim and in this case, it's just the cat. If the cat's name is just the owner's name, you can probably do this.
Code:
remove invisibility from ({_victim} parsed as a player)

Also, why are you deleting local variables? They automatically get deleted by itself after that part of the skript is over.
 
No. The cat is named "%&cplayer's name% Decoy". About the variables. Its because the code didn´t worked and I tried to deleting the local variables, but its true that you don't need them. And also I want to make that it clears you the effect of Invisibility, not to the cat. So I think that should work
[doublepost=1617487057,1617487022][/doublepost]Also, can you give me the full code, not just llike a part? eg


on death of cat:
etc
etc
etc
[doublepost=1617556652][/doublepost]?? Pls can you help me?
 
Status
Not open for further replies.