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

Why does the humanoid die instantly when the other one dies instead of taking damage?

local CheemS = script.Parent.Cheems
local BuffDoge = script.Parent.BuffDoge

CheemS.Boss.Died:Connect(function()
    BuffDoge.Boss:TakeDamage(100)
    
end)

i'm trying to make it so when a humanoid dies the other one will take damage but instead of whats intended the other humanoid just straight up dies here is a demonstration and yes it did take 100 damage from the script but it somehow dies instantly idk whats happening which i'm concerned https://gyazo.com/8217b7836b58be83da8ed72b5540b909

1 comment

0

idk what to tell you man. you’re just a really good rpg player

2 answers

You're dealing the 100 damage, which is the default maximum health on a humanoid. Check the NPC's humanoid properties and set max health to something above 100, and set the health to max health.

2 comments

0

the npc has above 100 health have you checked the gyazo video?

0

Ah, my bad. How much damage does the sword do?

You could set the health of the humanoid to -100 of what it is.

local CheemS = script.Parent.Cheems
local BuffDoge = script.Parent.BuffDoge

CheemS.Boss.Died:Connect(function()
    BuffDoge.Boss.Health -= 100
end)

1 comment

0

Yes, that's what I use. I was about to Say that but here :D

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