#Skript is not working

1 messages · Page 1 of 1 (latest)

twin frigate
#

My skript to prevent running to spawn in combat isn't working. It doesn't return any errors, but doesn't make any blocks look like barriers.

on damage of a player by player:
    loop all blocks in radius 10 around attacker:
        if loop-block is structure void:
            make attacker see loop-block as barrier
            wait 15 seconds
            make attacker see loop-block as structure void
    loop all blocks in radius 10 around victim:
        if loop-block is structure void:
            make victim see loop-block as barrier
            wait 15 seconds
            make victim see loop-block as structure void

hasty lake
#

vote trump it work better 😂

brave quest
twin frigate
#

bc they cant go through a barrier

#

And the "see" is clientside and makes their client think that the structure voids are barriers

#

so they won't be able to walk through it

twin frigate
#

Can someone please help?

hasty lake
#

dont understand how the”see” portion works as skript has no client side effect

twin frigate
hasty lake
#

if its visual it wouldnt have any effect on the players

hardy chasm
#

not quite

#

the client thinks its real

#

and it can interact with it, stand on it, or even place blocks on it(or at least try, it will probably trip the anticheat, or the default sanity checks in paper)

upper ledge
#

you could do like

#
on damage:
  victim is player
  attacker is player
  set {_players::*} to attacker and victim
  loop 2 times:
    set {incombat::%%{_player::%loop-number%}%'s uuid%} to true
  wait 5 seconds
  loop 2 times:
    delete {incombat::%%{_player::%loop-number%}%'s uuid%}
  
on region enter:
  if region is "Spawn":
    if {incombat::%player's uuid%} = true:
      push the player backwards at speed 1