Non Static Member

Hi, I want create a button for change the value of Speed, but I have this Error :
An instance of type ‘UnityStandardAssets.Character.FirstPerson.RigidbodyFirstPersonController.MovementSettings’ is required to access non static member ‘RunMultiplier’

#pragma strict

var Canvas : GameObject;

private var Menu : boolean=false;
private var m_Vitesse : UnityStandardAssets.Characters.FirstPerson.RigidbodyFirstPersonController;

m_Vitesse = GameObject.FindGameObjectWithTag("Player").GetComponent (UnityStandardAssets.Characters.FirstPerson.RigidbodyFirstPersonController);

function Start () {


function Update () {
	if (Input.GetKeyDown(KeyCode.Tab)){
		Menu = !Menu;

		if (Menu == true){

		else {


function VITESSE(){

	Debug.Log ("Ok");
	m_Vitesse.MovementSettings.RunMultiplier = 4;	

And this :

using System;
using UnityEngine;
using UnityStandardAssets.CrossPlatformInput;

namespace UnityStandardAssets.Characters.FirstPerson
    [RequireComponent(typeof (Rigidbody))]
    [RequireComponent(typeof (CapsuleCollider))]
    public class RigidbodyFirstPersonController : MonoBehaviour
        public class MovementSettings
            public float ForwardSpeed = 8.0f;   // Speed when walking forward
            public float BackwardSpeed = 4.0f;  // Speed when walking backwards
            public float StrafeSpeed = 4.0f;    // Speed when walking sideways
            public float RunMultiplier = 2.0f;   // Speed when sprinting
	        public KeyCode RunKey = KeyCode.LeftShift;
            public float JumpForce = 30f;
            public AnimationCurve SlopeCurveModifier = new AnimationCurve(new Keyframe(-90.0f, 1.0f), new Keyframe(0.0f, 1.0f), new Keyframe(90.0f, 0.0f));
            [HideInInspector] public float CurrentTargetSpeed = 8f;

            private bool m_Running; 

Take a look at the name that you’re calling: m_Vitesse.MovementSettings . If you have an IDE that supports this, right click on Movement settings and check where the definition.

Essentially, what you’re doing is referencing the class MovementSettings, rather than an object of type MovementSettings.

There should be an object of type MovementSettings in RigidbodyFirstPersonController (most likely titled m_MovementSettings). Reference that rather than the class itself.