Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a script remove stuff if a enemy dies?

Asked by
iuclds 720 Moderation Voter
4 years ago
if script.Parent.Died() then
    script.Parent.Parent.Head.Blood.Enabled = true
    script.Parent.Parent.Invisibility.Disabled = true
    script.Parent.Parent.MonsterScript.Disabled = true
    script.Parent.Parent.Void.Disabled = true
    script.Parent.Parent.Head.Transparency = 1
    game.Workspace.Fakes:Remove()
    game.ServerScriptService.CloneReaper.Disabled = true
    game.Workspace.Baseplate.ParticleEmitter:Remove()
    game.Lighting.DemonColor:Remove()
    game.Lighting.ExposureCompensation = 0
    game.Lighting.ClockTime = 14

end
0
The scripts parent? Dalbertjdplayz 37 — 4y
0
You should try checking if the humanoid's health is less than or equal too 0. Like this ~~~~~~~~~~~~~~~~~ if script.Parent.Health <= 0 then ~~~~~~~~~~~~~~~~~ Dalbertjdplayz 37 — 4y
0
:Destroy()? AndriusTheGreat 140 — 4y

1 answer

Log in to vote
0
Answered by
iuclds 720 Moderation Voter
4 years ago
if script.Parent.Health <= 0 then
Ad

Answer this question