I cant quite figure out how to do this. Im trying to make a skript that when a player dies there inventory will get copied and droped on the ground but they will still keep it.
set {_player} to victim
set {_inventory} to a new inventory
loop {_item} over {_player}'s items:
add {_item} to {_inventory}
drop all of {_inventory} at location of {_player}
cancel event```
This skript is not working and if there is anybody who knows how to please help me with this