So I’m trying to make a custom clothing script, for every player they will wear the same clothes, the problem is I don’t know how to put the clothes back on the player even after they die.
Current Code:
local SCRIPT_EVENT = script.Event
local PantsTemplate = 'rbxassetid://163869365'
local ShirtTemplate = 'rbxassetid://237076344'
SCRIPT_EVENT.Event:Connect(function(plyr)
plyr.CharacterAdded:Wait()
local Character = plyr.Character
if Character:FindFirstChild('Pants') then
Character:FindFirstChild('Pants').PantsTemplate = PantsTemplate
else if not Character:FindFirstChild('Pants') then
local Pants = Instance.new("Pants")
Pants.Name = 'Pants'
Pants.Parent = Character
Pants.PantsTemplate = PantsTemplate
end
end
if Character:FindFirstChild('Shirt') then
Character:FindFirstChild('Shirt').ShirtTemplate = ShirtTemplate
else if not Character:FindFirstChild('Shirt') then
local Shirt = Instance.new("Shirt")
Shirt.ShirtTemplate = ShirtTemplate
Shirt.Parent = Character
Shirt.Name = 'Shirt'
end
end
local Humanoid = Character:FindFirstChild('Humanoid')
Humanoid.Died:Connect(function()
-- Don't know what to do here
end)
end)