I am using humanoid.Died to detect when a player dies, but this is also being called when they leave the game. Is there a way I can check if they are leaving or not when this event gets called?
1 Like
humanoid.Died should only run when the health of the Player is equal to 0, not when the character is being destroyed. Could you perhaps send in the full script of you attempting to use the Died
event for the Humanoid
?
1 Like
This is the part where i used humanoid.Died
plr.CharacterAdded:Connect(function(char)
local hum = char:WaitForChild('Humanoid')
hum.Died:Connect(function()
onCharacterDied(char)
end)
end)
end)
2 Likes
nevermind i fixed it. It was a simple error in my script but i will give you the solution since you got me to look at my script.
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.