only assignment call increment decrement and new object expressions can be used as a statement, how do i fix this?

using UnityEngine;
using System.Collections;

public class Cam_beweging : MonoBehaviour {

// Use this for initialization
void Start () {
	GetComponents<Rigidbody> (MainCamera).velocity - new Vector3 (0, 0, 4); 

}

// Update is called once per frame
void Update () {

}

}

You don’t explain at all what you are trying to do so it’s pretty hard to give specific tips. I’ll just Explain what’s causing the errors.

  1. You can’t have a line of code where you just subtract a vector from another vector. Just like It makes no sense to write

    void Update() {
    7-2;
    }

Mathematical operations produce a result and you should do something with that result.
What did you want to do with velocity ? Set it to a value ? xxx.velocity = new Vector3 (0, 0, 4); Subtract from it and use that as the new velocity ? xxx.velocity = xxx.velocity - new Vector3 (0, 0, 4);

  1. There is no Generic “GetComponents” method (“generic” means it uses those < > symbols) that also takes a parameter. Here’s the documentation you get by Googling GetComponents The page also has examples of how to use both. You will get a list or an array of Rigidbodies depending on which you use. You can then set the velocity for those rigidbodies in a loop for example.