When a player is hit by an other player the nbt tag Motion[0] and Motion[2] aren't tracked this is not the case when an entity hits a player.
scoreboard objectives add motionx dummy
execute store result score <playerName> motionx run data get entity @p Motion[0] 10000
Thank you for your report!
We're tracking this issue as MC-122814, so this ticket is being resolved and linked as a duplicate.
That ticket has already been resolved as Won't Fix, which means this is considered a bug but won't be fixed. The description of that ticket or the comments might explain the rationale. Please do not leave a comment on the linked ticket.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
π Issue Guidelines β π¬ Community Support β π§ Customer Support β βοΈ Feedback and Suggestions β π Game Wiki
-- I am a bot. This action was performed automatically! Please report any issues in Discord or Reddit