I’m trying to clone parts of an outfit and add them to my character. It works fine, except for the fact that it wont stop cloning and parenting the items…
Here’s my script:
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
player.Chatted:Connect(function(msg)
if string.find(msg:lower(),"vestimentum") ~= nil and player.Name == "AdSomnum" and player.Character.Humanoid.ragdoll.Value == false and not player.Character.Humanoid.PlatformStand and player.Character.Humanoid.Health > 0 and player.Team.Name ~= "Visitors" then
local folder = game:GetService("ServerStorage"):WaitForChild("Outfits"):FindFirstChild("Kai")
for i,v in pairs(char:GetChildren()) do
if v:IsA("Accessory") or v:IsA("Decal") or v:IsA("Shirt") or v:IsA("ShirtGraphic") or v:IsA("Pants") then
v:Destroy()
end
local dress = folder.kaiDress:Clone()
local hat = folder.kaiHat:Clone()
local necklace = folder.kaiNecklace:Clone()
local hair = folder.kaiHair:Clone()
local faceless = folder.kaiHead:Clone()
local pants = folder.kaiPants:Clone()
local shirt = folder.kaiShirt:Clone()
dress.Parent = char
hair.Parent = char
necklace.Parent = char
faceless.Parent = char
hat.Parent = char
pants.Parent = char
shirt.Parent = char
end
end
end)
end)
end)