Scripting question with NPC Humaniods

Im trying to make it so that when an npc/enemy touches and effect (called “Fire”) its speed doubles. I only want this to work for one specific npc and not the player so I dont 100% know how I would do this. What should I do? Thx in advance.


You can try using a Touched event and change Humanoid.Walkspeed if the NPC’s name corresponds to a string. This part will be transparent and put over the fire.

1 Like

look at this. you have to make a part for it since fire can’t be physically touched and make it transparent with the fire ontop of it. change the humanoids walkspeed in the touched event

local currentWalkspeed = 16
   if hit.Parent.Humanoid then
          local newWalkspeed = currentWalkspeed * 2
          script.Parent.Humanoid.Walkspeed = newWalkspeed
          currentWalkspeed = newWalkspeed