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

Auto remove accessories on spawn?

Asked by 4 years ago

So I've been making this auto morph script, and I need to know how to make an auto accessory remover. I've tried everything I could think of, heres a link to my code:

Main script:

https://pastebin.com/1vTNx7tP

Auto accessory remove script(defective):

https://pastebin.com/SdCqHsCF

I would include the code in this text, but it is huge, and I want and/or need you to actually be able to read it.

1 answer

Log in to vote
0
Answered by 4 years ago

I'm not entirely sure why it needs to be so huge if all it's doing is removing accessories. But if you have the character of the player, then you should be able to use:

for i, v in pairs(Char:GetChildren()) do
    if v:IsA("Accessory") then
        v:Destroy()
    end
end
0
and then put that thru a CharacterSpawned event, see https://developer.roblox.com/en-us/api-reference/event/Player/CharacterAdded for more info. moo1210 587 — 4y
0
I meant that the main morph script is huge. AaronWilhelm -2 — 4y
0
Ah, ok. kkkeelan999 92 — 4y
Ad

Answer this question