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

May I request assistance on this Death Scream script?

Asked by 3 years ago

Ok, thank you for at least trying to help ^^ now, below is the script i made, (not good at scripting, just started)


script.Parent.Parent.Character.Humanoid.HealthChanged:connect(function() Death = math.random(1,4) if Death == 2 then script.Parent.Parent.Character.Head.Hurt1:Play() elseif Death == 3 then script.Parent.Parent.Character.Head.Hurt2:Play() elseif Death == 4 then script.Parent.Parent.Character.Head.Hurt3:Play() else end end)

What the script should do is: when the humanoid/character dies, the script shall play a random death sound which is placed in their head body part.

Although there was a warning called Global 'Death' is only used in the enclosing code.

Then I tried the script, and it did not work.

Thank you for reading!

0
Have you tried renaming the 'Death' variable? Gam3r_Play3r 47 — 3y
0
is it in a sever or local script? GamerJanko 50 — 3y
0
Sorry for the late reply! Yes, i did turn "Death" into a local variable, however it did not work. It was placed in a script, not a local script. Mrs_Blanche 2 — 3y

Answer this question