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

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

Asked by 2 years ago
Edited 2 years ago
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

0
idk what to tell you man. you’re just a really good rpg player ryan32t 306 — 2y

2 answers

Log in to vote
0
Answered by 2 years ago

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.

0
the npc has above 100 health have you checked the gyazo video? dylancrazy88 20 — 2y
0
Ah, my bad. How much damage does the sword do? Blxefirx 31 — 2y
Ad
Log in to vote
0
Answered by 2 years ago
Edited 2 years ago

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)
0
Yes, that's what I use. I was about to Say that but here :D Hamoodiyt 26 — 2y

Answer this question