Can Someone Help It’s Showing Error CS1001 Again Checked The Script But Can’t Find Any Error Some One Help Pls.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FlyLittleBird : MonoBehaviour {
public float velocity = 1;
private Rigidbody2D rb;
public float speed = 2;
// Use this for initialization
void Start () {
rb = GetComponent<Rigidbody2D.();
}
// Update is called once per frame
void Update () {
if(Input.GetKeyDown(KeyCode.Space))
{
//Jump
rb.velocity = Vector2.up * velocity;
}
}
}