The error I receive:
Assets/Scripts/Player.cs(33,74): error CS8025: Parsing error
My Script:
using UnityEngine;
using System.Collections;
public class Player : MonoBehaviour {
public float maxSpeed = 3f;
public float speed = 50f;
public float jumpPower = 150f;
public bool grounded;
private Rigidbody2D rb2d;
void Start()
{
rb2d = gameObject.GetComponent<Rigidbody2D>();
}
void Update()
{
}
void FixedUpdate()
{
float h = Input.GetAxis("Horizontal");
rb2d.AddForce((Vector2.right * speed) * h);
if (rb2d.velocity.x > maxSpeed)
(
rb2d.velocity = new Vector2(maxSpeed, rb2d.velocity.y))
Any help would be greatly appreciated!