Rotating on global transforms

Godot Version

4.6

Question

So I’m attempting to make my ship rotate based off of mouse movement, but if I say rotate 90 degrees to the left I start spinning when rotating up. How do I fix this?

self.rotate_y(-event.relative.x * msensitivity)
self.rotate_x(event.relative.y * msensitivity)

Use rotate_object_local() instead of rotate_x()

This appears to have worked, there is a slight rotation bug while using it but I think I can fix it, thank you