#Can I play animation to an item when holding it?
1 messages · Page 1 of 1 (latest)
Is your animation meant to affect the player, the item only or both
Either use commands to add a tag to detect if it is being held using the hasitem command parameter "/tag @s[hasitem=]" then use script API to detect if a player has that tag and I recommend using {yourconst}.playAnimation as it can run client animations so you can affect third person or first person, another way is to use attachables or player.entity.json and use the query "query.get_equipped_item_name('main_hand') == 'your_item' " and make sure the 'your_item' only contains the word(s) on your item at the identifier after the " : " for ex.
po:3ditem my query would be, query.get_equipped_item_name('main_hand') == '3ditem'
And use v.is_first_person and
!v.is_first_person to detect first person and third person