Collision, change skybox in game

I need a script that allows the skybox to change after my first person controller collides with an object.
I’ve tried this javascript
function OnTriggerEnter(other : Collider)
{
if (other.tag == “Player” && RenderSettings.skybox != otherSkybox)
RenderSettings.skybox = otherSkybox;
}
However, I do not know what to put in ‘otherSkybox’, what identifier to put.
Let’s say my skybox is called xxx in the assets folder, how do I apply it in this code?
Or are there any other simple codes that allow collision then skybox change in game?

Many thanks in advance

Right.

You going to need two objects, your player with the tag “Player” and a cube or something that has a collider on it.

Attach this script to the collider and it will work perfectly as I have tested it.

var Skybox1 : Material;
var otherSkyBox : Material;

function OnTriggerEnter(other : Collider){ //When the player enters the collider
	if(other.tag == "Player"){ //Checking if it is the player
		if(RenderSettings.skybox != otherSkyBox){ //if Skybox is not equal to the skybox we want
			RenderSettings.skybox = otherSkyBox; //change it to that skybox
		}
	}

}