Why does this Minecraft Rotation Command not work?

Solution 1:

I don't know why your command didn't work. I tried:

/execute as @e[name="Donkey Kong"] run data modify entity @s {Rotation: [180f, 0f]}

...but that didn't work either.

I know of a workaround using the /tp command:

/execute as @e[name="Donkey Kong"] at @s run tp @s ~ ~ ~ 180 0