Hi Masaeva Amina,
Thank you for reaching Microsoft Community.
As much as we would love to assist you on this, but this is already an in-game concern considering that the pen works fine on other applications. This would be best if we reach out to the game developer for assistance on this. Please reach them through here: Contact Us - Roblox.
Kind regards,
Marrion