#how to detect left click using entityHit?
1 messages · Page 1 of 1 (latest)
Why do you want to set the scoreboard that way, if i may ask?
I don't think it's possible to detect when player is hitting empty air
So you want it to add 1 score whenever they punch an entity?
no no like, im basically trying to detect when the player is left clicking, like how you would with an animation controller with variable.attack_time , except with scripts. while the player is swinging, scoreboard = 1 , while the player is not swinging, scoreboard = 0
so left clicking at any time?
yea
because you can't check for left click while punching air but you can check for left clicking on blocks and entities if that's what you want
so you don't want help anymore?
well actually, i am now wondering, how would i detect when the player punches a block?
if a player punches a block then yes, you can use detect it using entityHit
when using entityHit you can do let block = data.hitBlock and it will return the block that they hit