Help with triplanar shader

I’m using a triplanar shader to get my textures to tile correctly, however I have run into a bit of a problem. Textures on faces along the local x axis are sideways.
I’m not very good at shaders, so the triplanar shader I’m using is not one I’ve made and I don’t know how it works. The shader I’m using:

if anyone could tell me why textures along the x axis are sideways or how to fix it, it would be very much appreciated

Maybe you can try changing

float2 ty = IN.localCoord.zx * _MapScale;
float2 ty = IN.localCoord.xz * _MapScale;
or other two lines of script.

it’s just a guess. i haven’t done experiment in my side