Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

3 comments

0

The scripts parent?

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
0

:Destroy()?

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.