I'm having a problem with a deactivate script, it should make the object invisible at the start, and when i hit spacebar it should appear, but right now it only dissapears at start and that's all, what do i have to do??
function Start ()
{
renderer.enabled = false;
}
function update ()
{
if (Input.GetButtonDown("Jump"))
{
renderer.enabled = true;
}
if (Input.GetButtonUp("Jump"))
{
renderer.enabled = false;
}
}