Operator '+' cannot be used with a left hand side of type 'PlayerStatus' and a right hand side of type 'float'.

Im new to scripting but I am trying to connect two scripts so that one can change the variable in another script… im not sure if i wrote this correctly nor can I find the answer in any resources

#pragma strict

function Update () {

	var hunger: PlayerStatus = GetComponent(PlayerStatus);

		hunger += 60.00;


You’re trying to add a float to an object. The object has no numeric value. Now if hunger holds some form of public variable that you want to add 60 to you need to do this:

if (Input.GetKeyUp("space")) {
    hunger.yourPublicVariableHere += 60.00

Dont forget the types your adding together have to match otherwise you may lose data or have to revert to casting.