Need Help With Script (new to unity)

I’ve recently started Unity scripting and I need some help with my script. I’ve tried combining scripts to make my character able to move, jump, and pick-up items, thanks. At the “void start” part, it says void is “unexpected symbol” and in visual studio it has a line at the left showing purple/teal.

using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class PlayerController : MonoBehaviour {

    public float Speed = 150.0f;
    public Text countText;
    public Text winText;
    public AudioSource audio1;
    private Rigidbody rb;
    private int count;
    public float jumpSpeed = 8.0f;
    public float gravity = 20.0f;
    private Vector3 moveDirection = Vector3.zero;

    private void Update()
    {
        CharacterController controller = GetComponent<CharacterController>();
        if (controller.isGrounded) {
            moveDirection = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));
            moveDirection = transform.TransformDirection(moveDirection);
            moveDirection *= speed;
            if (Input.GetButton("Jump"))
                moveDirection.y = jumpSpeed;
        }
        moveDirection.y -= gravity * Time.deltaTime;
        controller.Move(moveDirection * Time.deltaTime);
    }
}

    void Start()
    {
        rb = GetComponent<Rigidbody>();
        count = 0;
        SetCountText ();
        winText.text = "";
    }

    void FixedUpdate()
    {
        float moveHorizontal = Input.GetAxis("Horizontal");
        float moveVertical = Input.GetAxis("Vertical");

        Vector3 movement = new Vector3(moveHorizontal + 0.1f, 0.0f, moveVertical);

        rb.AddForce(movement * Speed);
    }
     
    void OnTriggerEnter(Collider other)
    {
        audio1.Play();
         
      if (other.gameObject.CompareTag("Pick Up"))
        {
            other.gameObject.SetActive(false);
            count = count + 1;
            SetCountText ();
        }
    }

    void SetCountText ()
    {
        countText.text = "Score:" + count.ToString ();
        if (count == 8)
        {
            winText.text = "You Win!";
        }
    }
}

You have an extra brace - i.e. { - on line 30.

I realized that but on line 23 it says “speed does not exist in the current context”

Most programming languages are case sensitive. Speed and speed are not the same thing. You have a public variable called Speed, but on line 23 you’re trying to use speed.

My player jumps and everything now, but the code I had after that made it interact with the points and count the score does not do anything anymore.

You’ll need to go through your code and figure out what isn’t happening that you think should be happening. You can use Debug.Log to display messages in the console. Log the values of variables, log whether you made it inside a certain if, and so on. You’ll need to follow the flow of the code and find out where it is going wrong. Welcome to debugging! You’ll be doing a lot of it. :slight_smile:

Also would appreciate if you could help me with moving in midair, because once I jump it goes in a straight line up, I appreciate your help.

I would suggest going through the tutorials in the Learn section linked at the top of the page. There are some really good tutorials teaching scripting and important game programming topics.

And if you are willing, you should learn to use the Debugger for either MonoDevelop or Visual Studio: