So I made a script for a liquid, the liquid is supposed to remove all fire instances from the NPC, but for some reason, it just deletes the NPC itself.
The way it works is that the player presses a button, and then the liquid fills up the room that the NPC is in with the help of tweenservice.
This is the script for the liquid:
function putFireOut()
local NPC = workspace.Lab.AIButton.Subject
local getFire = NPC:GetDescendants()
for i,getFire in pairs (getFire) do
if getFire:FindFirstChild("Fire") then
getFire:Destroy()
end
end
end
local coolerLiquid = workspace.Lab.AIButton.CoolerLiquid
coolerLiquid.Touched:Connect(putFireOut)
Any help would be appreciated

1 comment
But you can clear it by using the function :Clear() heres a guide https://developer.roblox.com/en-us/api-reference/function/ParticleEmitter/Clear