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

Is it for the appearance?

How do you make a script so that when a player joins a game it automatically has it wearing something of MY choice?

2 answers

Learn up on how to use the PlayerEntered(function) and how to use a for loop to loop through the player to see if they are wearing clothes. So, really, its more then those two, You need to learn the classnames of clothing. so, of you wanted to delete a hat, it would look like:

//the functions are up here, also anything else
for i, v in pairs(whatever you need here table) do
if v:IsA("Hat") == true then
v:Destroy()
end
end
//anything else, including the end of the function.

3 comments

0

i also forgot, use the CharcterAdded(function) event as well.

0

Ok, keep up the good work to get back your rep, dont forget he asked for all appearance, that mean shirts and pants as well :P

0

Yes, thank you. Also, I know he wanted all of them, I just want him to learn what he needs to learn himself, because franky, I suck at teaching compared to the wiki, so I would rather have him/her do the research for it.

You would want to use the PlayerAdded event first, then you would want to use the characteradded event after that. Using the char variable you should be able to change the characters looks using Hat object, shirt object, pants object, ect!

[[ USEFUL LINKS ]] *http://wiki.roblox.com/index.php?title=API:Class/Player/CharacterAppearance *http://wiki.roblox.com/index.php?title=Character *http://wiki.roblox.com/index.php?title=API:Class/Shirt *http://wiki.roblox.com/index.php?title=API:Class/Pants *http://wiki.roblox.com/index.php?title=Hat

game.Players.PlayerAdded:connect(function(player) -- Player added event |player parameter passed
	player.CharacterAdded:connect(function(char) -- Character added event | Character variable parameter passed
		--Change character clothing here using the char variable
		--I cannot write it all for you, you must learn, this is not a request site!!
		end) -- Close parenthesis
end) --Close parenthesis

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