On death i cancel the event, but i still want the player to be teleported to their spawn point

  • 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 comminuty!

    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!

AQika

Member
Jun 28, 2023
30
2
8
24
On death i cancel the event, but i still want the player to be teleported to their spawn point and if spawn point isn't set then i send them to a specified location. No i can't just not use the cancel event. Minecraft version 1.21.1
 
Just do it after you cancel the event
Code:
on death:
    cancel event
    teleport player to spawn
 
No i mean the player's spawn point, as in a bed or a respawn anchor. Not the spawn. This does not work as intended and i already tried this solution,
 
is there any reason for canceling the death event? you could get your intended outcome by disabling death messages and enabling keep inventory, these are within vanilla Minecraft so you don't need any plugins.
Code:
/gamerule showDeathMessages false
/gamerule keepinventory true
 
The lag caused by actually killing the player, and how inventory is handled, and I'd also like to know how to send someone to spawb