#Any idea why this isnt working?

1 messages · Page 1 of 1 (latest)

glacial ibex
#

on step on pressure plate: if player is in region "uphub": teleport player to location at 107, 64, 271 set player's yaw to 269.4 set player's pitch to 3.386 set {_bar} to boss bar with id "findup" with title "1:00" with color red with progress 100 add player to {_bar} wait 1 second set {_bar} to boss bar with title "0:59" add player to {_bar} remove player from {_bar}

THe end part is the part that doesn't work. I want the time to go down on the bossbar every second. Also is there a better way of doing with then manually changing the time every second in the code

ruby schooner
#

just do

  remove player from {_bar}
  set {_second} to 60 - loop-value
  set {_bar} to boss bar with title "0:%{_second}%"
  add player to {_bar}
  wait 1 second```
#

full code should be

    if player is in region "uphub":
        teleport player to location at 107, 64, 271 
        set player's yaw to 269.4
        set player's pitch to 3.386
        set {_bar} to boss bar with id "findup" with title "1:00" with color red with progress 100
        add player to {_bar}
        wait 1 second 
        loop 60 times:
            remove player from {_bar}
            set {_second} to 60 - loop-value
            set {_bar} to boss bar with id "findup" with title "0:%{_second}%" with color red with progress 100
            add player to {_bar}
            wait 1 second```
glacial ibex
#

it keeps stopping at 0:59....

#

oh wait i think the problem is my previous code set the bar to 0:59 but i don't know how to get rid of it even though i deleted the code because it already addded the bossbar to me

#

it's just stuck like that

#

how do i remove it

#

nevermind that wasn't the problem

silk rover
#

why are you making a new bar every time instead of just changing its title

glacial ibex
#

i'll try that