function onTouched(hit)
local human = hit.Parent:findFirstChild("Humanoid")
local fire = script.Parent.ParticleEmitter
if (human ~= nil) then
local TR = hit.Parent:findFirstChild("Torso")
local LA = hit.Parent:findFirstChild("Left Arm")
local RA = hit.Parent:findFirstChild("Right Arm")
local RL = hit.Parent:findFirstChild("Left Leg")
local LL = hit.Parent:findFirstChild("Right Leg")
if (LL ~= nil) then
local clone = fire:Clone()
clone.Parent = TR
clone.Parent = LA
clone.Parent = RA
clone.Parent = LL
clone.Parent = RL
wait(2)
local p= hit.Parent:GetChildren()
for i= 1, #p do
if p[i].className == "Part" then
p[i].BrickColor = BrickColor.new(26)
wait(1)
human.Health = human.Health - 0.4
end
end
end
end
end
The script only sets my Left Leg (LL) on fire when I touch it, can someone fix this problem so it effects the whole body when you touch the fire. Thankyou q.q ;c.
|