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

Is it for the appearance?

Asked by 9 years ago

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

Log in to vote
1
Answered by 9 years ago

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.
0
i also forgot, use the CharcterAdded(function) event as well. rollercoaster57 65 — 9y
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 dragonkeeper467 453 — 9y
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. rollercoaster57 65 — 9y
Ad
Log in to vote
0
Answered by 9 years ago

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

Answer this question