#Script Help
1 messages · Page 1 of 1 (latest)
I am going to try
In "HitEntity.typeId"
You called (data.entity)
But what is this "data"?
If I'm not mistaken, you don't need to use your event name to call a function
try to use this:
starter(player)
Still the error 'player' is not defined
This is because there is no player variable
Do you want to identify the player?
yes
Or when the player hits the entity?
yes when the player hits the entity
To identify who knocked, you can use:
const player = entityHit.damagingEntity
Put this const on top of the first If, that might solve the problem...
To identify just the player you can use:
if (player.typeId == 'minecraft:player')
@quartz fossil it doesn't error anymore thank you for helping
