Set Clothing after reset/death

Hello, so i have a data store that sets characters clothing from a character costimization. It works when you load into a game, but when you reset it all goes away. I want to know how i can make a new finction that goes[Character dies, Character comes back, Since character is back after death set the clothing]. But i dont know how that function would work or how i would make it

You would want to use CharacterAppearanceLoaded using the player variable from your .PlayerAdded function.

For example using the the variable from PlayerAdded I then make another connection for when there character appearance loads on spawn:

game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAppearanceLoaded:Connect(function(character)
   -- Code that sets the shirt and pants
    end)
end)
1 Like

So this will set it again after the player dies or resets?

Yeah, it doesnt work, it doesnt set after the character dies

The code should run when the player’s character appearance shows up. Add a print statement to confirm that this work. If it does, but the player’s outfit does not show, it’s probably because your set clothing code isn’t working as intended.

It does not print at all. Maybe because its doing it if a player is added but the player is already added its just the character was destroyed becuase of death or i dont know

Is this script done on a local script or a server script?

server script(more text bc text limit)

Alr other gy is gone, can someone else please help me?

Maybe try

game.Players.PlayerAdded:Connect(function(player)
   player.CharacterAdded:Connect(function(character)
      local CharName = character.Name
      print("Character "..CharName.." Has loaded")
   end)
end)