How to change variable from another script

Hi,im actually working on a little game(a parkour game more specificaly) and i try to make a chekpoint system but im facing a difficulty. My system work that way, there a big trigger on the bottom of the map and if you fall in it, the position of the player change to the start of the level. Now i try to make the first chekpoint this way: when he the player enter the trigger, the restart position if the player fall in the trigger at the bottom of the map change to another position not to the start of the level. But i cant figure how to change that position(3 variable 1 for the y 1 for the z and one for the x) using another script. I read many documentation and question but this dont help solve my problem. Heres the dead zone(ZoneDeMort.js)

var Joueur:GameObject;

@HideInInspector

public var JoueurY:float=1.315027;

@HideInInspector

public var JoueurX:float=5.94885;

@HideInInspector

public var JoueurZ:float=-1.150034;

function Start () {

}

function Update () 
{

}
function OnTriggerEnter()

{				
	Joueur.transform.position=Vector3(JoueurX,JoueurY,JoueurZ);

	Debug.Log("le joueur est entrer");
}

and here the chekpoint empty (Chekpoint1.js)

function Start () {

}

function Update () {
	
	
}

function OnTriggerEnter()
{

	var Joueury=gameObject.GetComponent(ZoneDeMort);

	Joueury.JoueurY=0;
}

I try something but that didnt work when i enter the trigger it says NullReferenceException: Object reference not set to an instance of an object

this aint verry accurate. I know i can use this but how this is the question

Two ways to do this, where it says monobehaviour at the top change it to the name of the other script to reference it. I do this to cut the amount of lines in a particular piece of code so it doesn’t read like an scroll from past ages.

Or you can do what some people call the Naughty way:

Public static (int / float whatever) on one script and call it in the next with Getcomponent ();

Then:

if (Scriptname.variable){

Do Stuff here

}

var character = GameObject.FindWithTag(“Scary Sheep”);, is to find things based you have based upon an assigned tag. It won’t help you call variables between different scripts…