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

Do events and stuff disconnect when you reset your character?

Asked by 4 years ago
game.Players.LocalPlayer.Character.Humanoid.Changed:Connect(function(C)
    warn("A")
end)

For example the code above, it needs to be called each time you die to work. Does events get disconnected when you die automatically?

1 answer

Log in to vote
0
Answered by
gskw 1046 Moderation Voter
4 years ago

Yes, event connections that are bound to a character's Humanoid will be disconnected automatically when the character respawns. This is because the old character Model is deleted, and the Humanoid, along with any event connections, will be destroyed along with it.

Ad

Answer this question