I’m confused on why my local script isn’t working.
The script is intended to get the shirt, pants, and body colors from the player’s character connected to the server, then clone it and get the id’s from the shirt/pants to the humanoid’s shirt and pants.
The local script is located in starter player scripts.
local PlayersService = game:GetService('Players')
PlayersService.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
-- INTRODUCTION --
local IntroductionDummy = game.Workspace:WaitForChild('IntroductionDummy')
local CharacterBodyColors = Character:FindFirstChild('Body Colors'):Clone()
CharacterBodyColors.Parent = IntroductionDummy
for i, v in pairs(Character:GetDescendants()) do
if v:IsA('Shirt') then
IntroductionDummy:WaitForChild('Shirt').ShirtTemplate = Character:FindFirstChild('Shirt').ShirtTemplate.Value
end
if v:IsA('Pants') then
IntroductionDummy:WaitForChild('Pants').PantsTemplate = Character:FindFirstChild('Pants').PantsTemplate.Value
end
if v:IsA('BodyColors') then
local BodyColors = Character:WaitForChild('Body Colors'):Clone()
BodyColors.Parent = IntroductionDummy
end
end
end)
end)