if hit.Material == Enum.Material.Wood then
if hit.IsBurning.Value == true then
return
elseif hit.IsBurning.Value == false then
if hit:FindFirstChild("FireSpreadNormal") then
return
else
local catchTime = math.random(5, 10)
wait(catchTime)
hit:BreakJoints()
hit.IsBurning.Value = true
hit.Anchored = false
hit.BrickColor = BrickColor.new("Black")
if hit:FindFirstChild("FireSpreadNormal") then
else
SpreadFireScript(hit)
end
end
end
elseif hit.Material == Enum.Material.Concrete then
print("Cannot burn")
end
So, I am making a fire spreading script and I wanted to make the fire not spread to parts/objects that are made of non-burnable materials such as concrete. For some reason the script does not follow the if statements but just does first "if". I have no idea why this isn't working.
P.S: "hit" is a variable for the part that touched the burning part. <<--- Don't know if that will help but just in case.

4 comments
do you know how to use return
Do you have it on a constant loop?
You are using return after 2nd if statement... So the script will stop there
Oops, my bad. I think you have a constant loop in your script that is above your if statement?