How do i make the character jump?

if i want the character to jump when i press space! is it? "yvelocity = -8;"
but if i write that script the character jumps out of sight. i just want it to jump a little bit! please help me!
but if i write that script the character jumps out of sight. i just want it to jump a little bit! please help me!