Hey i need help, im kinda new to skript and i dont really know why my skript isnt working.

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

claytyne

Member
May 12, 2020
26
0
1
23
Code:
on damage:
  if (final damage/2) is greater than player's health:
     cancel event
       set the player's gamemode to spectator
       send title "" with subtitle "&cYOU DIED!" to player

im trying to make a minigame death.. like in Hypixel Skywars
 
Last edited:
send over the entirety of your code, please.
thats all of the code.
[doublepost=1589373936,1589373728][/doublepost]
Also send your errors

Code:
indentation error: expected 4 spaces, but found 5 spaces (death.sk, line 3: cancel event')
Server thread/ERROR indentation error: expected 4 spaces, but found 7 spaces (death.sk, line 4: set the player's gamemode to spectator')
Server thread/ERROR indentation error: expected 4 spaces, but found 7 spaces (death.sk, line 5: send title "" with subtitle "&cYOU DIED!" to player')
Server thread/ERROR Use 'attacker' and/or 'victim' in damage events (death.sk, line 2: if (final damage/2) is greater than player's health:')

thats the error msg, i tried solving it by doing what it told me but it didnt work
 
Code:
on damage:
    if (final damage/2) is greater than victim's health:
        cancel event
        set the victim's gamemode to spectator
        send title "" with subtitle "&cYOU DIED!" to victim
Try with it, this error is because you need to put just 4 spaces and you have 5 spaces. And on death event you can't use "player", you must to use victim or attacker.
 
Status
Not open for further replies.