How do I make speed decrease after death?

Ok, so I’m making a game that as you run your speed increases, if you aren’t running it decreases. I’ve noticed after the player’s death, which is really just teleporting back to the start, the player will maintain the same speed. How would I make the speed reset back to normal after the death? Idk how to show the code on here as a lot of ppl do so if you know how to fix it but need to see my code. Plz tell me how to show the code lol

I propose to write the speed at the beginning to a static variable that does not disappear, and set it after teleporting.
This is code (If your speed is not 0)

    static float variable = 0;
    void Update()
        if(variable ==0) vatiable = /*Your speed*/
                else /*Your speed*/ = variable