Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Copy hats and clothing from a character?

Asked by 5 years ago

Was wondering if it was possible to copy a characters hats and clothing and after they press a button or something they would be taken off then re-applied back on. If this is possible how could it be done; Thanks.

0
make the cloothing invisible? TheluaBanana 946 — 5y
0
More so for a tool that on click it takes it off applies different clothing then puts back on your original IrishStukov 20 — 5y

1 answer

Log in to vote
0
Answered by
Nikkulaos 229 Moderation Voter
5 years ago

Here, hope this helps:

local p = game.Players.LocalPlayer
repeat wait() until p.Character
local c = p.Character

local folder = Instance.new("Folder",script)
folder.Name = "ClothesHolder"

function removeclothes() -- Puts your clothes in a folder.
for i,v in pairs(c:GetChildren()) do
if v:IsA("Shirt") or v:IsA("Pants") or v:IsA("Accessory") then
v.Parent = folder
end
end
end

function grabclothes() -- Puts your clothes back.
for i,v in pairs(folder:GetChildren()) do
if v:IsA("Shirt") or v:IsA("Pants") or v:IsA("Accessory") then
v.Parent = c
end
end
end

wait(1)
removeclothes() -- Calls the function to remove yor clothing.
wait(1)
grabclothes() -- Calls the function to return the clothing.
0
Thanks IrishStukov 20 — 5y
0
np Nikkulaos 229 — 5y
Ad

Answer this question