What the variable motorSetter and motor type should be ?

This is how my WayPoints script was in the original

using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using UnityStandardAssets.Characters.ThirdPerson;

public class WayPoints : MonoBehaviour {

    public GameObject[] waypoints;
    public Transform target;
    public float moveSpeed = 1f;
    public float rotationSpeed = 1f;
    private Transform myTransform;
    private int targetsIndex = 0;
    private Vector3 originalPosition;

    public float walkSpeed = 15f;

    void Awake()
    {
        myTransform = transform;
    }
    // Use this for initialization
    void Start()
    {
        waypoints = GameObject.FindGameObjectsWithTag("ClonedObject");

        foreach(GameObject go in waypoints)
        {
            SphereCollider sc = go.AddComponent<SphereCollider>() as SphereCollider;
            sc.isTrigger = true;
        }

        foreach (GameObject go in waypoints)
        {
            go.AddComponent<SlowDown>();
        }

        originalPosition = myTransform.position;
    }

    // Update is called once per frame
    void Update()
    {
        if (MyCommands.walkbetweenwaypoints == true)
        {
            WayPointsAI();
        }

        DrawLinesInScene();
    }

    private void WayPointsAI()
    {
        if (targetsIndex == waypoints.Length)
            targetsIndex = 0;
        target = waypoints[targetsIndex].transform;
        float distance = Vector3.Distance(myTransform.position, target.transform.position);
        myTransform.rotation = Quaternion.Slerp(myTransform.rotation, Quaternion.LookRotation(target.position - myTransform.position), rotationSpeed * Time.deltaTime);

        //move towards the player
        myTransform.position += myTransform.forward * moveSpeed * Time.deltaTime;
        if (distance < 2f)
            targetsIndex++;
    }

    void DrawLinesInScene()
    {
        // draw lines between each checkpoint //
        for (int i = 0; i < waypoints.Length - 1; i++)
        {
            Debug.DrawLine(waypoints*.transform.position, waypoints[i + 1].transform.position, Color.blue);*

}

// draw a line between the original transform start position
// and the current transform position //
Debug.DrawLine(originalPosition, transform.position, Color.red);

// draw a line between current transform position and the next waypoint target
// each time reached a waypoint.
if (target != null)
Debug.DrawLine(target.transform.position, myTransform.position, Color.green);
}
}

Then i created more one script
using UnityEngine;

class SlowDown : MonoBehaviour
{
private void OnTriggerEnter(Collider other)
{
Debug.Log("Object " + other.name + " entered " + name);
WayPoints.SetSpeed(WayPoints.moveSpeedSlowed);
}

private void OnTriggerExit(Collider other)
{
Debug.Log("Object " + other.name + " exited " + name);
WayPoints.SetSpeed(WayPoints.moveSpeed);
}
}

Now i need to use the SlowDown script with my WayPoints script so i added to the WayPoints script:
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using UnityStandardAssets.Characters.ThirdPerson;

public class WayPoints : MonoBehaviour {

public GameObject[] waypoints;
public Transform target;
//public float moveSpeed = 1f;
public float rotationSpeed = 1f;
private Transform myTransform;
private int targetsIndex = 0;
private Vector3 originalPosition;

//setters for setting everything in Unity editor
public float moveSpeedSetter = 1f;
public float moveSpeedSlowedSetter = 0.5f;
public GameObject motorSetter;

//static objects changeable via any script
public static float moveSpeed;
public static float moveSpeedSlowed;
public static motor;

public static void SetSpeed(float speed)
{
motor.movement.maxForwardSpeed = speed;
}

public float walkSpeed = 15f;

void Awake()
{
myTransform = transform;
}
// Use this for initialization
void Start()
{
waypoints = GameObject.FindGameObjectsWithTag(“ClonedObject”);

foreach(GameObject go in waypoints)
{
SphereCollider sc = go.AddComponent() as SphereCollider;
sc.isTrigger = true;
}

foreach (GameObject go in waypoints)
{
go.AddComponent();
}

moveSpeed = moveSpeedSetter;
moveSpeedSlowed = moveSpeedSlowedSetter;
motor = motorSetter;
motor.movement.maxForwardSpeed = moveSpeed;

originalPosition = myTransform.position;
}

// Update is called once per frame
void Update()
{
if (MyCommands.walkbetweenwaypoints == true)
{
WayPointsAI();
}

DrawLinesInScene();
}

private void WayPointsAI()
{
if (targetsIndex == waypoints.Length)
targetsIndex = 0;
target = waypoints[targetsIndex].transform;
float distance = Vector3.Distance(myTransform.position, target.transform.position);
myTransform.rotation = Quaternion.Slerp(myTransform.rotation, Quaternion.LookRotation(target.position - myTransform.position), rotationSpeed * Time.deltaTime);

//move towards the player
myTransform.position += myTransform.forward * moveSpeed * Time.deltaTime;
if (distance < 2f)
targetsIndex++;
}

void DrawLinesInScene()
{
// draw lines between each checkpoint //
for (int i = 0; i < waypoints.Length - 1; i++)
{
Debug.DrawLine(waypoints*.transform.position, waypoints[i + 1].transform.position, Color.blue);*
}

// draw a line between the original transform start position
// and the current transform position //
Debug.DrawLine(originalPosition, transform.position, Color.red);

// draw a line between current transform position and the next waypoint target
// each time reached a waypoint.
if (target != null)
Debug.DrawLine(target.transform.position, myTransform.position, Color.green);
}
}

But first i’m getting errors on the motor and motorSetter variables. They should not be GameObject type and not ThirdPersonCharacter and also not sure about giving it the name motor and motorSetter.
But how do i fix this errors and how do i combine the SlowDown with the function WayPointsAI ?
What i want to do is that when the character(ThirdPersonController) is moving between the waypoints when getting close to a waypoint to slow down and then after making the turn/rotate to the next waypoint speed up back to the moving speed he was. Even if the user is changing the speed between waypoints always after the next waypoint slow down then speed up to the last speed he was moving.
But i messed it all up with the SlowDown script and the new variables in the WayPoints script.

public static void SetSpeed(float speed)
{
motor.movement.maxForwardSpeed = speed;
30. }

You are calling movement.maxForwardSpeed on something you don’t know the type of…
How did you come to this? There has to be a reason to place movement.maxForwardSpeed after a variable, otherwise it is as logical as saying

 transform.makeMe.aSandwich();

Anyway, when you are coding, try not to blindly copy code (not saying you did) from a website or someone else but really try to understand what the code does. This makes it easier to handle errors when testing.