if i == 2 then game.Lighting.DarkSkies.Parent = game.ServerStorage game.ServerStorage.Hell.Parent = game.Lighting game.Workspace.wave45:Stop() game.Workspace.FinalBossMusic:Play() game.ServerStorage.FinalBoss.Parent = game.Workspace game.ServerStorage.Towers.Parent = game.Workspace if 49999 > game.Workspace.FinalBoss.Humanoid.Health then game.Lighting.Hell.Parent = game.ServerStorage game.Workspace.FinalBossMusic:Stop() game.Workspace.FinalBoss.Parent = game.ServerStorage game.Workspace.Towers.Parent = game.ServerStorage end end
This is the code^ everything works fine until;
if 49999 > game.Workspace.FinalBoss.Humanoid.Health then
Boss normaly has 50k health and i want to make disappear everything when I shoot him once but it doesnt work everytime i try.
And I also tried;
if game.Workspace.FinalBoss.Humanoid.Health < 49999 then
But still not happend.
I will be very happy if this issiue solved :)
You need to separate the two if statements by putting an
end
after the
game.ServerStorage.Towers.Parent = game.Workspace
and deleting the last
end
of the code. Your code should look like this:
if i == 2 then game.Lighting.DarkSkies.Parent = game.ServerStorage game.ServerStorage.Hell.Parent = game.Lighting game.Workspace.wave45:Stop() game.Workspace.FinalBossMusic:Play() game.ServerStorage.FinalBoss.Parent = game.Workspace game.ServerStorage.Towers.Parent = game.Workspace end if 49999 > game.Workspace.FinalBoss.Humanoid.Health then game.Lighting.Hell.Parent = game.ServerStorage game.Workspace.FinalBossMusic:Stop() game.Workspace.FinalBoss.Parent = game.ServerStorage game.Workspace.Towers.Parent = game.ServerStorage end