Help im getting this error Assets/MouseManager.cs(38,32): error CS1525: Unexpected symbol `grabbedObject'

using UnityEngine;
using System.Collections;

public class MouseManager : MonoBehaviour {

	Rigidbody2D grabbedObject = null;
	
	Vector2 mousePos2D;

	float dragSpeed = 4f;

	void Update() {
		if( Input.GetMouseButtonDown (0)){
			Vector3 mouseWorldPos3D = Camera.main.ScreenToWorldPoint(Input.mousePosition);
			mousePos2D = new Vector2(mouseWorldPos3D.x, mouseWorldPos3D.y);
		}
		
		Vector2 dir = Vector2.zero;
		RaycastHit2D hit = Physics2D.Raycast (mousePos2D, dir);
		if(hit && hit.collider && hit.collider.GetComponent<Rigidbody2D>() != null) {
			hit.collider.GetComponent<Rigidbody2D>().gravityScale = 1;
		}

	    if( Input.GetMouseButtonDown (0)){
			grabbedObject = null;
		}
	}

	void FixedUpdate() {
		if(grabbedObject != null) {
		   Vector3 mouseWorldPos3D = Camera.main.ScreenToWorldPoint(Input.mousePosition);
		   mousePos2D = new Vector2(mouseWorldPos3D.x, mouseWorldPos3D.y);

		   Vector2 dir = mousePos2D - grabbedObject.position;

		   dir *= dragSpeed

		   grabbedObject.velocity = dir;
		}
	}
}

On line 36…

dir *= dragSpeed

You’re missing a semicolon.

I would suggest that you find a basic C# programming tutorial and learn the language syntax. That will help you spot these sorts of errors more quickly so you can move on to more interesting things. :slight_smile:

You are missing a semicolon that’s why u are getting this error