#i need help
1 messages · Page 1 of 1 (latest)
healthComponent.currentValue.toFixed(1)
1 messages · Page 1 of 1 (latest)
const healthComponent = player.getComponent("minecraft:health");
const health = Math.round(healthComponent);
if (health == 20) {
player.nameTag = `${ranks}\n§8${player.name}\n`
}
Why doesn't it work? (does not give an error)
healthComponent.currentValue.toFixed(1)