So, basically, I made this script, where when you step on this part, a random body part of yours catches fire. Here's the script:
local part = script.Parent
local db = false
function burn(hit)
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")
local myArray = {p1, p2, p3, p4, p5}
if human then
if not db then
db = true
part.Sound:Play()
for i,v in pairs(myArray) do
fire:Clone().Parent = math.random(v)
wait(2)
db = false
end
end
end
end
part.Touched:connect(burn)
It's supposed to take one of the bodyparts in "myArray", but it doesn't and says I gave it a bad argument. Any ideas? All help is appreciated!
