#.getRotation() method returns undefined
1 messages · Page 1 of 1 (latest)
world.afterEvents.chatSend.subscribe(({ message, sender })) => {
if (message === '!test'){
const rot = sender.getRotation()
console.warn(`x:${rot.x}, y:${rot.y}`)
};
});```
alr thx I'll test it
Btw make sur your script is beta cause after events of chatsend is beta afaik
Tbh i didn't do anything, i just clean up lmao
This works just fine for me. What version of the API are you using?
1.16.0-beta
Remove one parenthesis after the anon function parameters, this is a syntax error
And in the content logger you see x: undefined, y: undefined?
i didn't know but I'm already using it so thanks anyways
Hm, it really ought to be returning a Player instance. Can you run console.warn(typeof eventData.sender)?
it says "object"
but it works now