• 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
Hello, i need help with this:

on place of a GOLD BLOCK:
message "Spawnpoint set"
make player execute command "/spawnpoint %player%"

I want to make spawnpint on top of the gold block
How to do it?

And if gold block destroyed, spawnpoint removed.
 
Code:
on place:
    if event-block is gold block:
        set {spawnpoint.%player%} to location above event-block
        send "&aSpawnpoint set."
        stop

on break:
    if event-block is gold block:
        #if location above event-block is {spawnpoint.%player%}:
        delete {spawnpoint.%player%}
        send "&cSpawnpoint removed."
        stop
 
Code:
on place:
    if event-block is gold block:
        set {spawnpoint.%player%} to location above event-block
        send "&aSpawnpoint set."
        stop

on break:
    if event-block is gold block:
        #if location above event-block is {spawnpoint.%player%}:
        delete {spawnpoint.%player%}
        send "&cSpawnpoint removed."
        stop

I placed gold block, and killer my self, but spawnpoint not working. But no errors
 
I placed gold block, and killer my self, but spawnpoint not working. But no errors
b: https://gyazo.com/aedf0ec3f8bf024cf72535b0e32e33aa

on death event: https://gyazo.com/6d9b2a14c5ed692636e8a5d63edd73a2

Code:
on place:
    if event-block is gold block:
        set {spawnpoint.%player%} to location above event-block
        send "&aSpawnpoint set."
        stop
 
on break:
    if event-block is gold block:
        if location above event-block is {spawnpoint.%player%}:
            delete {spawnpoint.%player%}
            send "&cSpawnpoint removed."
            stop

on death of a player:
    set death message to ""
    set player's hunger to 10
    heal player
    teleport player to {spawnpoint.%player%}
    stop
 
Status
Not open for further replies.