#.getRotation() method returns undefined

1 messages · Page 1 of 1 (latest)

sinful reef
#

so basically i wanted to get the rotation of a player, and i tested this

world.afterEvents.chatSend.subscribe((eventData) => {
  if (eventData.message === '!test'){
    const { x, y } = eventData.sender.getRotation();
    console.warn(`x:${x}, y:${y}`)
  };
});```
but both properties return undefined
sturdy sable
sinful reef
#

alr thx I'll test it

sturdy sable
#

Tbh i didn't do anything, i just clean up lmao

spice whale
spice whale
#

And in the content logger you see x: undefined, y: undefined?

sinful reef
spice whale
#

Hm, it really ought to be returning a Player instance. Can you run console.warn(typeof eventData.sender)?

sinful reef
#

but it works now