I keep getting the same error in this super weird place, ive followed the tutorial just as I should have but it still doesn't work.
(number 13 is the one with gameObject, it got a little messed up when i copied it in here)
CODE:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class boost : MonoBehaviour
{
private Rigidbody2D rb2D;
// Start is called before the first frame update
void Start()
{
rb2D gameObject.GetComponent();
}
// Update is called once per frame
void givejump ()
{
rb2D.AddForce(new Vector2(0f, 5f));
}
}
error message:
Asset\script\boost.cs(13,24): error cs1003: Syntax error, `,´ expected
↧