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.
You should put the line 30&31 to line 05 because your actually checking if the part is not burning before the part material