Trigger not triggering

I have a trigger item, the istrigger being on it’s box collider, also has arigidbody, and the player, who has a capsule collider, and a rigidbody.

My script that handles the trigger:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityStandardAssets.Characters.FirstPerson;

public class Player : MonoBehaviour
{
List WildCreatures;
List StoredCreatures;
List OtherTrainerCreatures;
GameObject CreaturesInInv;
int nextserialnumber;
bool inbattle;
GameObject SpawnTile;
GameObject Player1;
GameObject Creature;
GameObject Player1Camera;
GameObject CreatureCamera;
CharacterController Player1Input;
CharacterController CreatureInput;
// Start is called before the first frame update
void Start()
{
nextserialnumber = 0;
inbattle = false;
WildCreatures = new List();
StoredCreatures = new List();
OtherTrainerCreatures = new List();
CreaturesInInv = new GameObject[4];
Vector3 spawnPos = transform.position + transform.forward * 2;
GameObject Teddy = Instantiate(GameObject.FindGameObjectWithTag(“Teddy”), spawnPos, transform.rotation);
CreaturesInInv[0] = Teddy;
Teddy.active = false;
Player1Camera = gameObject.transform.GetChild(0).gameObject;
Player1Input = gameObject.GetComponent();
; }

// Update is called once per frame
void Update()
{

}

public static GameObject CreateCreature()
{
    int Creaturenumber = (int)Random.value;
    if (Creaturenumber == 0)
    {
        GameObject[] PossibleCreatures = GameObject.FindGameObjectsWithTag("Teddy");
        for (int i = 0; i < PossibleCreatures.Length; i++)
        {
            if (PossibleCreatures*.transform.position.y < 0)*

{
return PossibleCreatures*;*
}
}
}
return GameObject.FindGameObjectWithTag(“Teddy”);
}
public void OnTriggerEnter(Collider other)
{
Debug.Log(inbattle);
if (inbattle == false)
{
Vector3 placetospawn = transform.position + transform.forward * 10;
placetospawn.y = (float)0.3;
GameObject newcreature = Instantiate(CreateCreature(), placetospawn, Quaternion.Euler(0, transform.rotation.y * 100 + 180, 0));
WildCreatures.Add(newcreature);
WildBattle(gameObject, newcreature);
other.gameObject.GetComponent().Move();
}
}
public void WildBattle(GameObject Player, GameObject WildCreature)
{
inbattle = true;
Player1 = gameObject;
Creature = CreaturesInInv[0];
Creature.active = true;
Creature.transform.position = transform.position + transform.forward * 4;
Creature.transform.position = new Vector3(Creature.transform.position.x, (float)0.3, Creature.transform.position.z);
CreatureCamera = Creature.transform.GetChild(0).gameObject;
CreatureInput = Creature.GetComponent();
CreatureCamera.active = true;
CreatureInput.enabled = true;
Player1Camera.active = false;
Player1Input.enabled = false;
}
}

If this script is attached to the player, the IsTrigger bool of the player’s collider must be true (checked) for OnTrigger functions to work.

Okay, i fixed it. My trigger was too short, and my script wasn’t on the gameobject.