I am using unity 2017.1.0f3 and i have some error trying to make a code that will open rotate the door when i click on them with my left mouse button.

I dont have much experience with Unity and i dont know how to fix it :confused:

the error is:

Assets/Door.cs(12,13): error CS1061: Type UnityEngine.Transform' does not contain a definition for rotSpeed’ and no extension method rotSpeed' of type UnityEngine.Transform’ could be found. Are you missing an assembly reference?

The code:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class Door : MonoBehaviour {

	float rotSpeed = 120.0f;

	void OnMouseButton (){ 



	// Use this for initialization
	void Start () {
	// Update is called once per frame
	void Update () {



the answer is in the error, i suggest you check the documentation, and its Vector3 :stuck_out_tongue_winking_eye: