Still have questions? Join our Discord server and get real time help.
0

# How to delete accesories on local player in local script?

Hello. How do you delete accessories on the local player in a local script? Is it something like:

game.Players.LocalPlayer.CharacterAdded:Connect(function()
local plr = game.Players.LocalPlayer.Character
if plr.Accessory then --Not sure what to do at this part and after, I don't even think this is how you put it.
Accessory:Destroy()
--??? ... That can't be right...
end
end



I'm sure thats not how you do it. But any help from you is appreciated, thanks.

1

This is my way of doing it. If it doesn't work then I made an error on my end

game.Players.LocalPlayer.CharacterAdded:Connect(function()
local plr = game.Players.LocalPlayer.Character
for i, v in ipairs(plr.Character:GetChildren) do
if v:IsA("Accessory") then
v:Destroy()
end
end
end



Cheers! Zander.

0
There is an error: It says character is not a valid member of plr in line 3 of your example - Wait, never mind, I fixed it myself, thanks. StirSavvy 31 — 3mo
0
Okay! Cynical_Innovation 597 — 3mo