whats wrong with this script. it wont work

using UnityEngine;
using System.Collections;

public class OcclusionCulling : MonoBehaviour {

	private Renderer objThatCanBeCulled;

	void OnTriggerEnter(Collider other)
	{
		if (other.gameObject.tag == "guy") {
			for (i = 0 ; i < objThatCanBeCulled.size; i++) {

				{
					objThatCanBeCulled*.enabled = false;*
  •  		}*
    
  •  	}*
    
  •  }		*
    
  • }*
    }

Actually you need to specify the exact errors otherwise it is not possible to provide precise solutions.

But here are a few things:

Your objThatCanBeCulled needs to be an array since you are accessing it as an array. your line where you declare it should be:

private Renderer[] objThatCanBeCulled;

And you instantiate array usually in Start or somewhere like:

void Start()
{
    // This is an array of size 10
    objThatCanBeCulled = new Renderer[10];
}

Also you access the size of an array using Length. Also ā€˜i’ should have a type. Correct statement will be:

for (int i = 0 ; i < objThatCanBeCulled.Length; i++) 

I also assume that there are elements put inside your array.