Question about a Fire Spreading Script

Okay so I’m making a game where a fire is able to spread around a forest but I’m stuck on figuring out how to make something catch on fire when another thing is on fire.

I’m using raycasting to make a system for the fire to spread and to check if a line has been cut to stop the spread fire.

“FireAvailable” attribute states if the log is able to be caught on fire
“OnFire” attribute states if the log is already on fire

CuttingLine script:

Fire script:

Ask me anything and I should be able to answer it.
If I left anything out let me know.

Just look for if the Object has the Instance Fire in it, if it does, the script will leave it alone, if not, it will add the fire