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

Changeing a specific player's clothing?

So I had this idea where if in a game I created a script that would give a certain player (myself as an example) a set of clothes (eg. shirt, pants, face). At the moment I'm not even sure how to find the player. I have tried to get the game to look in the workspace for a player name but that doesn't seem to work. No idea what to do here.

2 comments

0

It depends on which player you want to get. That is, anyone who joins the game, anyone who steps on a brick, only someone with a certain username, etc.

0

Username

1 answer

Use events, my friend. As Perci1 said on comment, you can find a player if player touches a part, clicks on something, joins the game etc. All of those events brings you some object to work on. .Touched event of Part gives you a BasePart which is touched part of player or something else, or .ChildAdded (or PlayerJoined? I do not remember that event) gives you a Player object which is child of game.Players

To change clothes of a player, simply find its character. Player.Character(For Joined event) or TouchedPart.Parent(For Touched event) will do it. Also you can find a specific player with its nickname by using game.Workspace:FindFirstChild("PlayerName") and after finding Character of Player, change IDs of Pants and Shirt objects.

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