So, I have tried all kinds of scripts for player to jump upwards or bounce off of a platform but none of them worked.
When I press Play, it looks like something is blocking my player from jumping or bouncing up.
This is the script from tutorial I found on YT, and it works fine for that person but not for me. I’m not sure what could be the problem but I think the problem is not in the script.
private void OnCollisionEnter2D(Collision2D collision)
{
if (collision.gameObject.GetComponent().velocity.y <= 0)
{
collision.gameObject.GetComponent().AddForce(Vector3.up * 60f);
}
}