Quick question

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

Status
Not open for further replies.

Endas

Member
Jun 22, 2020
10
0
1
44
How to make spawnpoint on top of the gold block, and didnt let player place another gold block.
 
Code:
on place of gold block:
    if {respawnlocation} is set:
        cancel event
        send "You cannot do this!" #optional
        stop
    set {_loc} to location of event-block
    add 1 to y-coordinate of {_loc}
    set {respawnlocation} to {_loc}
    send "Respawn location set!" #optional

on respawn:
   set respawn location to {respawnlocation}

#edit - this is better:
on respawn:
    if {respawnlocation} is set:
        set respawn location to {respawnlocation}
And maybe you would like to be able to clear that block...
Code:
command /respawnclear:
    #optional permissions
    trigger:
        set {_loc} to {respawnlocation}
        remove 1 from y-coordinate of {_loc}
        set block at {_loc} to air
        clear {respawnlocation}
        send "Respawn location cleared!" #optional
Note: I did not test it and I'm not saying it will work instantly. I'm sure you'll have to adjust it to your own needs :emoji_grinning:
[doublepost=1592922952,1592922147][/doublepost]Also... do not create multiple threads which then spam the entire forum! :emoji_rage:
 
Status
Not open for further replies.