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

How do people make player's normal roblox clothes get replaced with custom ones?

I just wanna know. I could just go into their character and destroy their normal clothes, but they all have different names. How do people do it?

1 answer

✓ Accepted answer

Use the player and character added event. Then you could use IsA().

game.Players.PlayerAdded:connect(function(plyr) --When the player joins the game...
	plyr.CharacterAdded:connect(function(char) --when the players character loads
		local clothes = char:GetChildren() --Get the character children
for i = 1, #clothes
if clothes[i]:IsA("Clothing") then --Gets shirt and pants
if clothes[i].Name == "Shirt" then --Gets shirt
Shirt.ShirtTemplate  = ShirtIdHere --The shirt id goes there.
elseif clothes[i].Name == "Pants" then --Gets pants
clothes[i].PantsTemplate = PantsIdHere --Pants ID go here.
end end end end) end) --End.

Clothing, PlayerAdded, CharacterAdded, :IsA().

2 comments

0

Thx!

0

Your welcome. You can look at the links below to study them.

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