Boolean not toggling

Hello

I am having trouble with a bool not activating. the print works but unity completely ignores the bool toggle. could someone please help me understand why.

thanks

using UnityEngine;
using System.Collections;

public class CollisionManager : MonoBehaviour 
{
	private string Room;

	public bool Active = false;

	public void OnTriggerStay(Collider onStay)
	{
		InterfaceManager interfaceManager = GetComponent<InterfaceManager>();
		Room = onStay.tag;
		if(Room == "Storage")
		{
			Active = true; >>>> this is completely ignored and does not toggle to true
			print(Room); >>>> this prints the current rooms tag

		}
	}
}

First, I recommend changing the name of your boolean because I’m not sure if “Active” could be a reserved name or not. It might be causing issues.

Ok, 2 things.

1 . To use OnTrigger functions the object need a rigidbody component.

2 . Instead of using room=onStay.tag;, and then checking, use if (onStay.CompareTag("Storage"))

References: