Hi, there was a thread like this one back in 2018.
Basically, I want to create player corpses.
I'm running Spigot 1.12.2, tried creating the corpses with SkRayfall's NPC, but didn't find the sleep expressions.
Skript-NPC addon has the expression, but it's not working.
Skellett's got CorpseReborn hooks, but my skript cant find the expressions.
I somehow managed to get it working with SkRayFall, but It worked for 1 time only, with mixed expressions from various addons. Then I added some more code.. and everything failed.

For some reason my skin changed to some ginger dude.
I also tried to send bed packets to the created citizens, but it also won't work.
Should I just update the plugin? Im running 2.4-b10
If anyone could help I'd be really grateful!
2018 thread: https://forums.skunity.com/threads/making-corpses.4450/
Here's the code:
Basically, I want to create player corpses.
I'm running Spigot 1.12.2, tried creating the corpses with SkRayfall's NPC, but didn't find the sleep expressions.
Skript-NPC addon has the expression, but it's not working.
Skellett's got CorpseReborn hooks, but my skript cant find the expressions.
I somehow managed to get it working with SkRayFall, but It worked for 1 time only, with mixed expressions from various addons. Then I added some more code.. and everything failed.

For some reason my skin changed to some ginger dude.
I also tried to send bed packets to the created citizens, but it also won't work.
Should I just update the plugin? Im running 2.4-b10
If anyone could help I'd be really grateful!
2018 thread: https://forums.skunity.com/threads/making-corpses.4450/
Here's the code:
Code:
command /as: #code back from 2018
trigger:
broadcast "%player% died"
create a citizen named "%player%" at player
set {NPC.%player%} to last created citizen
broadcast "%{NPC.%player%}%"
set {_l} to block 2 below location of player
set location of {_l} to bed
make the last citizen sleep
wait 10 seconds
on right click on entity:
if clicked entity is a citizen:
broadcast "ho"
broadcast "%{id}%"
broadcast "%{NPC.%player%}%"
command /a1:#Skrayfall
trigger:
create a citizen named "%player%" at player
set {NPC.%player%} to last created citizen id
set {citi} to citizen {NPC.%player%}
broadcast "%{NPC.%player%}%"
make citizen {NPC.%player%} nametag invisible
command /a2:
trigger:
execute console command "npc sel %{NPC.%player%}%"
execute console command "npc rem"
command /b1:#Skript-NPC
trigger:
create npc named "Nano" with type player at player's location
set {id} to the last created citizen
wait 1 second
make the last citizen sleep
command /b2:
trigger:
destroy citizen {id}