How do I check if a part doesn’t have fire with the same name?
Script
1. local SpreadableFire = script.Parent
2. local Part = SpreadableFire.Parent
3. Part.Touched:Connect(function(Hit)
4.
5. if Hit:IsA("BasePart") and not Hit:GetChildren():IsA("Fire") then
6.
7. print(Hit.Name)
8. wait(1)
9. local TPart = Hit
10. local Fire = SpreadableFire:Clone()
11. Fire.Parent = TPart
12. TPart.Anchored = false
13. TPart.BrickColor = BrickColor.new("Really black")
14. TPart.Material = Enum.Material.CorrodedMetal
15. Fire.Script.Disabled = true
16. Fire.Script.Disabled = false
17. wait(5)
18. for _, v in pairs(TPart:GetChildren()) do
19. v:Destroy()
20. end
21.
22. end
23.
24. end)
I’m trying to make a spreadable fire that duplicates from part to part.