I have been working on a destroying game. Everything is working fine. Except that I have a problem with my fire. It won’t show up when the part destroys. Does anyone know how to fix that?
local hit = script.Parent.Touched:Wait()
workspace.House:Destroy()
workspace.Sound:Play()
script.Parent.Fire.Enabled = true
wait(5)
script.Parent.Fire.Enabled = false
Yes, because when you do workspace.House.Destroy you are Destroying the house and the script that’s in it, therefore the fire is getting destroyed as well.
When House is getting destroyed, the script and the fire also get destroyed because they’re the part children, therefore I suppose the script itself stops(causing Sound not to play). Instead the part should be destroyed after 5 seconds, which will cause Fire to also be destroyed:
local part = script.Parent
local hit = part.Touched:Wait()
workspace.Sound:Play()
part.Fire.Enabled = true
task.wait(5)
part:Destroy()