Script isn't checking the if statements. How do I fix this?
01 | if hit.Material = = Enum.Material.Wood then |
03 | if hit.IsBurning.Value = = true then |
06 | elseif hit.IsBurning.Value = = false then |
08 | if hit:FindFirstChild( "FireSpreadNormal" ) then |
11 | local catchTime = math.random( 5 , 10 ) |
15 | hit.IsBurning.Value = true |
17 | hit.BrickColor = BrickColor.new( "Black" ) |
19 | if hit:FindFirstChild( "FireSpreadNormal" ) then |
30 | elseif hit.Material = = Enum.Material.Concrete then |
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.