Basically, in the title, the script works in Roblox studio, just not on the game
it removes accessories then add’s new ones
local Avatar = game.Workspace.Character.MainAvatar
script.Parent.MouseButton1Click:Connect(function()
local descendants = Avatar:GetDescendants()
for _, descendant in pairs(descendants) do
if descendant:IsA("Accessory") then
descendant:Destroy()
end
end
local accessories = script:GetDescendants()
for _, descendant1 in pairs(accessories) do
if descendant1:IsA("Accessory") then
local main = descendant1:Clone()
Avatar.Humanoid:AddAccessory(main)
end
end
end)