So basically my script works once or twice but then shows a Roblox error and I don't know how to fix it. Down here is what it says when I touch the 2 parts. (1 part burns me and the other extinguishes the fire)
The Parent property of Fire is locked, current parent: NULL, new parent Handle
PART 1
f = Instance.new("Fire")
script.Parent.Touched:Connect(function(Touch)
if not Touch:FindFirstChild("Humanoid") then
f.Parent = Touch
print(Touch.Name)
end
end)
PART 2
script.Parent.Touched:Connect(function(water)
if water:FindFirstChild("Fire") then
water.Fire:Destroy()
end
end)

2 comments
It happens when the fire is destroyed in the second event listener but you parent it in the first event listener.
So how would I fix it? Can you resolve my script for me?