Script error after introducing moveSpeed

in the introducing variables video I get a script error after introducing moveSpeed. Anyone know what I’m doing wrong?

using System.Collections;

using System.Collections.Generic;

using UnityEngine;

public class Driver : MonoBehaviour

{

float steerSpeed = 1f;

float moveSpeed = 0.01f



void Start()

{



}

void Update()

{

   transform.Rotate(0, 0, steerSpeed);

   transform.Translate(0, moveSpeed, 0);

}

}

lol, missing ;

Were you able to fix the problem, @MrFool? :slight_smile:


See also:

Hi Nina,

Yes, I was just missing a colon for that part of the code. I’m actually stuck on a different issue now. I’ll pot it as a new topic in a sec.

Thank you!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms