How can I activate Light/particles by pressing a button/keypad

I’m trying to make it so you can start playing a particle system and activate a Point light by pressing a button/keypad, how can I do that?

When you say “button”, do you mean a keyboard/gamepad button, or a virtual button inside the game world?

A keyboard/gamepad
Sorry I wasn’t clear enough

Where are you getting stuck? The Input Manager? Toggling the point light / particle system?

What have you tried so far?

I tried using this code, but it doesn’t work
Maybe its because I have to set up thing at the input manager? Though I don’t know how to do this

if(Input.GetKeyDown(KeyCode.A)){
    	particles.Play();
    }
    
    if(Input.GetKeyUp(KeyCode.A)){
    	particles.Stop();
    }

So… are the particles not playing at all? Is there an error in the console?

Right now the particles should only play when you’re holding down the button. Is that what you intend?

And you’re not doing anything with a light. Is that somewhere else or have you not implemented it yet?