im very new to unity so im having trouble with this error.
the line is 29,61 heres the code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
if (Input.GetKey("left"))
{
gameObject.GetComponent<Rigidbody2D>().AddForce(new Vector2(-1000 * Time.deltaTime, 0));
}
if (Input.GetKey("right"))
{
gameObject.GetComponent<Rigidbody2D>().AddForce(new Vector2(1000 * Time.deltaTime, 0));
}
if (Input.GetKeyDown("up"))
{
gameObject.GetComponent<Rigidbody2D>().AddForce(Vector3, 0, 10 * Time.deltaTime, 0, ForceMode2D.Impulse);
}
}
}