Roll a Ball script error?!
I typed the script and did everything, only that whenever I try to "play" to test it, the ball doesn't move. Instead, when I look at the console, it says the error message when I try to move the ball with my arrow keys:
Also, in the inspector, it says, "The associated script cannot be loaded. Please fix any compile errors and assign a valid script."
My script looks like this:
Please help!!!!
Answer by MobinYaqoob · Nov 13, 2015 at 06:58 AM
Make it this way : Create a Gameobject Add Rigidbody to it Add a collider to it Now on PlayerController Script
public Rigidbody rb;
//Drag the gameobject to this parameter.
void Start ()
{
}
void FixedUpdate ()
{
rb.AddForce(your required force);
}
Answer by tebandesade · Dec 04, 2015 at 09:24 PM
@dldbdms0630 Hi by any chance do you have the script slot of the component of your Game Object ("Player) empty? If so, click the circle next to the right of the text field (Missing (Mono Script)) and below the gear icon and select the GameController script.