Hello, i have a trigger enter script that only seems to work when i attach it to the floor tiles and the player but i want to only want it to be attached to the floor tiles becuase if its attached to both the floor tiles and the players it will create problems in the future. heres my script
using UnityEngine;
using System.Collections;
public class Action : MonoBehaviour {
void OnTriggerEnter(Collider other){
Movement2 m = (Movement2)GetComponent("Movement2");
m.AdjustCurrentAction(-1);
}
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
}
The floor tile has a box collider and a mesh renderer attached to it
the player has a mesh renderer, box collider and rigidbody added to it
please help thanks in advance