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

Is there a reason why Humanoid.Died isn't working?

Asked by 4 years ago
Edited 4 years ago

I tried using the Humanoid.Died script as a test but it didn't work. I used the one posted here which was

game:GetService('Players').PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(character)
        character:WaitForChild("Humanoid").Died:Connect(function()
            print(player.Name .. " has died!")
        end)
    end)
end)

is there something i'm missing? I'm new to scripting so forgive me if I do something wrong. I tried this script in StarterCharacterScripts and StarterPlayerScripts

0
What does it say in the output? rushknight 17 — 4y
0
nothing, i was looking for a "has died!" but i didnt see anything DaBagelBoy 90 — 4y
0
What type of script is it in? Where is that script located? srimmbow 241 — 4y
0
I put it in a local script. I put it inside of StarterCharacterScripts, StarterPlayerScripts, Workspace, StarterPack, and StarterGui but it didn't work in any of them. I didn't get any output. DaBagelBoy 90 — 4y

1 answer

Log in to vote
0
Answered by
zane21225 243 Moderation Voter
4 years ago

The issue is that you're putting the script into StarterCharacterScripts & StarterPlayerScripts.

I suggest placing the script either into Workspace or ServerScriptService.

Other than that, I can't seem to find an issue.

I mean if you're copypasting the code that Roblox themselves provided, it's probably just that you are placing it in the wrong thing.

0
I didn't realise i was supposed to put it in a normal script. The problem was that I put it in a local script, thank you. DaBagelBoy 90 — 4y
0
Glad I could help! zane21225 243 — 4y
Ad

Answer this question