How can I to get all accessories from a player character and then clone them somewhere else? I tried some scripts but they gave me errors.
✓ ANSWER ACCEPTED
How to get every accessories on player, then clone them ?
1 answer
✓ Accepted answer
Here is code for Local Script:
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:wait()
wait(2)
for i,v in pairs(Player.Character:GetChildren()) do
if v:IsA("Accessory") then
local Clone = v:Clone()
Clone.Parent = game.Workspace --set the parent here
end
end
Here it is for a Script:
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Char)
wait(2)
for i,v in pairs(Char:GetChildren()) do
if v:IsA("Accessory") then
local Clone = v:Clone()
Clone.Parent = game.Workspace --set the parent here
end
end
end)
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
thx Gooddddd
accept please?