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

So how do I make this script repeat after a Player has died?

Asked by 3 years ago
game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAppearanceLoaded:Wait()
    player.Character.Humanoid:RemoveAccessories()
end)

1 answer

Log in to vote
0
Answered by 3 years ago

You could attach a CharacterAdded event inside your PlayerAdded event to so that it fires every time a new character is created which happens every time a player dies,

game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(character)
        local humanoid = character:WaitForChild("Humanoid")
        humanoid:RemoveAccessories()
    end)
end)
Ad

Answer this question