I’m very new to coding, so i apologize if this is a question with an obvious answer, but whenever i have this block of code running, my character will constantly move up from the moment I start the game, but if i disable the code or cut out this section, the character falls (which is what I want to happen at any time that the “w” button isn’t being pressed.)
void Update()
{
if (Input.GetKey("w")) ;
{
rb.velocity = new Vector3(0, 10, 0);
}
}