What I am attempting to do here is clone a fire particle into any humanoid figure it touches.
For example, a zombies right leg hits the flames and the particle gets cloned into the leg then damages it over time and eventually goes away.
I'm still learning in pairs
local particle = script.Parent.clonefire local particleclone = particle:Clone() script.Parent.Touched:Connect(function(hit) for i,v in pairs(hit:GetChildren()) do if v:IsA("BasePart") and v.Name ~= "HumanoidRootPart" then particleclone.Parent = hit end end end)
You have the right code, it's just that you are trying to scan through objects that are descendants... of an object. To get the players Character, first of all you need to use hit.Parent, as hit returns the part that touched it.
However it seems that you want to clone it into the part that touches, so all you need to do is use a conditional if statement to check if there are already particles in the leg, and if not then clone them into it.
local particle = script.Parent.clonefire local particleclone = particle:Clone() script.Parent.Touched:Connect(function(hit) for i,v in pairs(hit.Parent:GetChildren()) do if v:IsA("BasePart") and v.Name ~= "HumanoidRootPart" and not v:FindFirstChild("clonefire") then particleclone.Parent = hit end end end)