Hello, probably not the right category, anyway So
This is my script:
game.Players.PlayerAdded:Connect(function(Player)
if Character:GetAsync(Player.UserId) then
Player.CharacterAdded:Connect(function()
local data = pcall(function()
Character:GetAsync(Player.UserId)
end)
if data then
local CharacterOOf = Player.Character or Player.CharacterAdded
CharacterOOf.Humanoid.Health = -102
wait(0.3)
CharacterOOf.Humanoid.Health = 100
local dataxd = Character:GetAsync(Player.UserId)
for i,v in pairs(CharacterOOf:GetChildren()) do
if not v:IsA("Shirt") and not v:IsA("Pants") and v:IsA("CharacterAppearance") or v:IsA("Accessory") then
v:Destroy()
end
end
print(dataxd.HairName)
game.ReplicatedFirst.Hairs:WaitForChild(tostring(dataxd.HairName)):Clone().Parent = CharacterOOf
local Shirt = CharacterOOf:WaitForChild("Shirt")
Shirt.Parent = CharacterOOf
Shirt.Name = "Shirt"
Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id="..dataxd.ShirtId
local Pants = CharacterOOf:WaitForChild("Pants")
Pants.Parent = CharacterOOf
Pants.Name = "Pants"
Pants.PantsTemplate = "http://www.roblox.com/asset/?id="..dataxd.PantsId
for i,v in pairs(CharacterOOf:GetChildren()) do
if v:IsA("MeshPart") or v:IsA("Part") or v:IsA("UnionOperation") or v:IsA("BasePart") then
v.BrickColor = BrickColor.new(dataxd.SkinColor)
end
end
elseif not data then
game:GetService("TeleportService"):Teleport(Player, 4530548451)
end
end)
end
end)
It works 100% Fine. But I have a trouble, the shirts I use, aren’t mines, are just some shirts I have on my inventory, if I use them like playing a Game It works, but when I try to set character shirt.
ShirtTemplate to any of the shirts, it says failed to load rbxassetid.