Well it could be a few things. First, I would ensure that your OnTriggerEnter is being called properly. Add something like this
Debug.Log(“Player entered trigger zone”)
within the OnTriggerEnter “if statement”. This will appear in the console if it’s properly detecting the player entering. Note for this to work properly, it needs three things:
- Collider
- Tag of “Player” on Collider object (or any tag you specify)
- A Rigidbody (kinematic or non-kinematic)
If all that works properly, then it’s time to check the animations. First, make sure everything is spelled properly and you’re using case sensitive names. If you wrote “playSpikes” for your parameter but have “PlaySpikes” for your script it won’t work. Also check to see if your transitions are working properly. If you’re still having issues let me know.