#display texts and scores under your name?

1 messages · Page 1 of 1 (latest)

trim birch
#

change player nametag

#

there is no other way using only script

#

what wired about it?

trim birch
quartz moss
#
const playerName = player.nameTag.split('\n')[0] //Splits using a new line
player.nameTag = `${playerName} Score:${score}` //Assuming score is defined
trim birch
#

dose that also display the score id ?

#

i think it is possible than

#
Scoreboard.setObjectiveAtDisplaySlot("BelowName",{objective: ScoreboardObjective, sortOrder: 0})
#

you know how to get
Scoreboard and ScoreboardObjective?

#
const Scoreboard = world.scoreboard
const ScoreboardObjective = Scoreboard.getObjective('scoreId') ?? Scoreboard.addObjective('scoreId','score display name')
#
const score = player.getscore('scoreId') ?? 0```
rustic sequoia
#

/scoreboard objectives setdisplay belowname "objective_name"

#

js do that command

floral pendant