So I have a simple script:
local part = script.Parent
local db = false
function burn(hit)
local myArray = {}
local p1 = hit.Parent:FindFirstChild("Left Arm")
local p2 = hit.Parent:FindFirstChild("Right Arm")
local p3 = hit.Parent:FindFirstChild("Left Leg")
local p4 = hit.Parent:FindFirstChild("Right Leg")
local p5 = hit.Parent:FindFirstChild("Torso")
local fire = Instance.new("Fire")
local human = hit.Parent:FindFirstChild("Humanoid")
table.insert(myArray{p1, p2, p3, p4, p5})
if human then
if not db then
db = true
fire.Parent = #myArray
end
end
end
part.Touched:connect(burn)
What it's supposed to do, is when I step on the part, ALL the body parts in myArray catch fire. But something is not working. Any ideas? All help is appreciated!

3 comments
Is it possible to make this with a "for i,v in pairs" loop? That'd work better. I don't like using things I don't understand.
Sure, I've edited my post.
You could just loop through everything in the character model and if the item is a basepart (and not the root part, if you want) then add the fire. Then you wouldn't need every limb in order for it to work.