I have a script that I am trying to use to change the y-axis so I can move my game paddle up and down (trying to make a 3d ping pong) and idk what is wrong with my script here is the script:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Paddle_2_controller : MonoBehaviour {
public float speed;
private Rigidbody rb;
void Start () {
rb = GetComponent ();
}
void FixedUpdate () {
float moveVertical = Input.GetAxis (“Vertical”);
Vector3 movement = new Vector3 (0.0f, 0.0f, moveVertical);
rb.AddForce (movement * speed);
}
}