i need help converting unityscript into c# script

ok i need this code converted into c# script and ive tried everything and no matter what i change it wont work…could someone please help me?
#pragma strict

var target : Transform;
var moveSpeed = 3;
var rotationSpeed = 3;
var myTransform : Transform;

function Awake(){
myTransform = transform;
}

function Start(){
target = GameObject.FindWithTag(“Player”).transform;
}

function Update () {
if(GameManager.canLoadPlayer)
{

myTransform.rotation = Quaternion.identity;

myTransform.position += myTransform.forward * moveSpeed * Time.deltaTime;
}
}

I didnt tested it, but i m sure its work, just try this:

using System;
using UnityEngine;
using System.Collections;

public class myScript: MonoBehaviour
{
	public Transform target;
	private int moveSpeed;
	private int rotationSpeed;
	private Transform myTransform;

	void Awake ()
	{
		myTransform = transform;
	}

	void Start ()
	{
		target = GameObject.FindWithTag ("Player").transform as Transform;		
	}

	void Update ()
	{
		if (GameManager.canLoadPlayer) {
			myTransform.rotation = Quaternion.identity;
			myTransform.position += myTransform.forward * moveSpeed * Time.deltaTime;
		}
	}
}

And its my personal advice (dont take in a wrong way) but from unity documentation u can find lots of help regarding csharp.

You’re assuming that he wants those variables to be private, even though they’re public in his JS code.

He might come back complaining that they don’t show up in the inspector anymore :stuck_out_tongue:

There are free converters in the asset store.

@DanielQuick,

You are right, but this type of small problems, he has to handle by himself.

thanks for the help and if it doesnt work i will look up those converters! (i didnt know those were available lol)

Convert unity javascript (unityscript) to C# you can use this website for convert unityscript to c# or c# to unityscript

If you want to convert code from js to c# you can leave all on Unity just compile a empty scene then look into your generated js assembly you might have to delete the compiler generated part of code but in rest you are good to go.