Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Auto remove accessories on spawn?

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

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

3 comments

0

and then put that thru a CharacterSpawned event, see https://developer.roblox.com/en-us/api-reference/event/Player/CharacterAdded for more info.

0

I meant that the main morph script is huge.

0

Ah, ok.

This discussion is preserved as it was. New answers, comments, and votes are closed.