It's about checking if a humanoid is killed, it gets deleted. What am I doing wrong?
Here's the script
while true do
wait()
workspace.TheWallOfFlesh:WaitForChild("Zombie")
if workspace.TheWallOfFlesh.Zombie.Health < 1
then workspace.WallOfFlesh:Destroy()
workspace.Fleshpart:Destroy()
workspace.Fleshpart2:Destroy()
workspace.Fleshpart3:Destroy()
workspace.Fleshpart4:Destroy()
workspace.Fleshpart5:Destroy()
workspace.Fleshpart6:Destroy()
workspace.Fleshpart7:Destroy()
local splode = Instance.new("Explosion")
splode.Parent = workspace.TheWallOfFlesh.Head
script.Parent.Text = "The Wall of Flesh Has been defeated!"
wait()
end
end

6 comments
You can do a repeat check until and then check() the health and then u can do what happens i think
Are TheWallOfFlesh and WallOfFlesh different things?
Or it could be filtering enabled,is that a local script?
Humanoid has .HealthChanged and .Died event listeners. For your application I suggest you use .Died, as that will check when the Humanoid’s Health actually hits 0 (you can have health values between 0-1) instead of constantly looping through this and eating up resources.
Yes. TheWallOfFlesh and WallOfFlesh are different things
Also i already figured this out by turning it into a local script