Ok i have spend a few hous going through unity answers and looking at the scripting API and i cannot figure out why my code is poping up errors. Im still learning C# in Unity so i probaly need someone to just. Im working on a teleporter that has a particle system as a trigger when you land. I have two different scripts for that the teleport one works perfectly but the particle system will not compile. Also i only want to particle system to activate when i trigger it.
the error is in

Code:


                var myParticles = GetComponent(particleSystem);

it says cannot resolve component GetComponent.UntitEngine.ParticleSystem).
I have also tried

Code:

var myParticles = GetComponent.particleSystem

Code:


using UnityEngine;
using System.Collections;

public class ParticleSystem : MonoBehaviour {
  
  // initialization of particle system
   void Start () {
   
   }
   
   // Update is called once per frame plays system on trigger
   void Update () {
        if ( collider.isTrigger == true)
            var myParticles = GetComponent(particleSystem);
            myParticles.Play;
        }
   }
}