Im trying to make a lifedrain effect which halves player hp, but i made some error with it which i havnt found. What did i do wrong?
onEvent('mob_effect', event => {
event.create('life_drain').modifyAttribute('minecraft:generic.max_health',
'837ccc62-fc36-4485-ba50-5f218e6da42e',
0.5, 'multiply_total').color(Color.RED_DYE)
})