Like The title says I Need a script that lets players keep effects after death this is what i tried and it didnt work
Code:
on death:
loop all potion effect on player:
delete {potions %player%::*}
add loop-value to {potions %player%::*}
on respawn:
loop {potions %player%::*}:
apply loop-value to player