How to make a character jump at a certain spot

Hey guys I’m a beginner with using unity and I wanted to add a jump pad to my game, so that when the character is on top of the jump pad and presses the spacebar, the character will jump. I was trying to do this using the rigid body, but I couldn’t get it to work.This is what I have:

public float speed;

void OnTriggerEnter(Collider other) 
{
	if (other.gameObject.tag == "Jump pad") 
	{
		if (Input.GetKey("space"))
		{
			Vector3 movement = new Vector3(0.0f, 100.0f, 0.0f);
			
			rigidbody.AddForce (movement * speed * Time.deltaTime);
		}
	}
}

I have the script attached to the player, I have the right tag for the jump pad, and I added a rigid body component to the jump pad. Can anyone help?

Try :

rigidbody.AddForce (movement * speed, ForceMode.VelocityChange);

The trigger event is a single event, so you can’t have anything to do with Time.deltaTime if you want to do it this way.

Edit : Note that if your speed var value is not very small(between 0 and 1) it will prob jump very high very fast…You may want to use this for your movement vector :

Vector3 movement = new Vector3(0f, 1f, 0f);

This has a magnitude of 1, now adjusting the jump power with the speed var should work as expected.