Code (CSharp): using System.Collections; using System.Collections.Generic; using UnityEngine; public class Movement : MonoBehaviour { private bool walk = true; public int Speed; // Start is called before the first frame update void Start() { walk = true; if (walk == true) { transform.position = transform.position + new Vector3(1 * Speed * Time.deltaTime, 0, 0); } } }
How to understand errors in general: https://forum.unity.com/threads/ass...3-syntax-error-expected.1039702/#post-6730855 How to report your problem productively in the Unity3D forums: http://plbm.com/?p=220 If you post a code snippet, ALWAYS USE CODE TAGS: How to use code tags: https://forum.unity.com/threads/using-code-tags-properly.143875/