Surface Effector doesn't work cause of the script

Helllo, As I said I have a problem with Surface effector and it doesn’t work because of this script Here’s the script:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class HeroController : MonoBehaviour
{
Animator anim;
public float speed;
public Rigidbody2D rb;
public float jumpforce;

// Start is called before the first frame update
void Start()
{
anim = GetComponent();
rb.GetComponent();
}

// Update is called once per frame
void Update()
{
float horizontalDir = Input.GetAxisRaw(“Horizontal”);
anim.SetFloat(“horizontalDir”, Mathf.Abs(horizontalDir));

rb.velocity = new Vector2(horizontalDir * speed, rb.velocity.y);

if(horizontalDir < 0)
{
transform.localScale = new Vector3(-1f, 1, 1);
}
if(horizontalDir > 0)
{
transform.localScale = new Vector3(1f, 1, 1);
}

if (Input.GetKeyDown(KeyCode.W))
{
rb.AddForce(new Vector2(0, jumpforce));
anim.SetTrigger(“Jump”);
}

}

}

That is an awful lot of words that mean actually nothing as far as the problem itself.

How to report your problem productively in the Unity3D forums:

http://plbm.com/?p=220

WHEN you post a snippet of code, please use code tags: https://discussions.unity.com/t/481379