Hi, what I'm trying to do here is put some clothes on someone when they respawn. **The Problem is that after they die, the person will go back to originally what they were wearing. ** I don't want that to happen and if anyone can help me, I will be really grateful.
function PutClothesOn()
Player = game.Players.LocalPlayer
local shirt = Player.Character:FindFirstChild("Shirt")
local pants= Player.Character:FindFirstChild("Pants")
repeat wait() until Player.Character
shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=243262382"
pants.PantsTemplate = "http://www.roblox.com/asset/?id=233071264"
function onPlayerRespawned(newPlayer)
local humanoid = newPlayer.Character.Humanoid
humanoid.Respawned:connect(PutClothesOn)
