reset my Y axis to 0 every time leaving 0

void fix()
{
if(shot.transform.position.y !=0.0f )
{
transform.position.y == 0 ;
}

void Update() {
transform.position.y = 0;
}
Perhaps you should learn some basic c# first.