Shield effect only on NPC

How can I do a part that give a shield effect only when a NPC walk on it?

What do you mean by “shield effect”? A force field?

I mean a forcefield effect,sorry

If you mean the effect of when you spawn into a game, you can just use a Touched event on a part, then create a new instance of a ForceField then parent it to the players character.

So I just have to use a normal forcefiled script but I only have to parent it to the name of an NPC?

Mhm, just Instance a new ForceField then parent it to whatever NPC/Character you want.