public void SetSpeed(float newSpeed) { moveSpeed = newSpeed; if (moveScript != null) { moveScript.SetMoveSpeed(moveSpeed); } }