Instantiate object rotated at other GameObject, but with chosen x axis rotation

I am making an enemyBehavior script , and i want a bloodsplat prefab to get spawned on the enemy, when they’re attacked. Problem is i want the rotation to be the same as the enemys rotation, but the x axis to always just be 90. This is what i have come up with

public void Damage() { 
        enemyHealth -= 35;
        Instantiate(bloodSplat, this.transform.position, new Quaternion(90 * Mathf.Deg2Rad, transform.rotation.y,transform.rotation.z,transform.rotation.w));

It works perfectly, except for some reason, the x axis rotation of the instantiated BloodSplats are completely random, and doesn’t seem to have any pattern.

Instantiate(bloodSplat, this.transform.position, Quaternion.Euler(90, transform.rotation.y,transform.rotation.z));

Welcome to the fun of messing with quaternions. Per the Unity documentation

They are based on complex numbers and are not easy to understand intuitively. You almost never access or modify individual Quaternion components (x,y,z,w);

Trying to modify the components directly the way you are will almost invariably result in weird behavior. Why are you trying to set the X axis to 90? Adjusting that axis is probably not actually accomplishing what you expect. Without knowing what you’re trying to achieve a more informative answer is difficult, but I’d look at the documentation and look into creating a new transform with the orientation you want and using that rotation, or using a function like Quaternion.Euler.


@Malek-Bakeer 's response below should work