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

Changeing a specific player's clothing?

Asked by
Nik1080 24
7 years ago

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.

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. Perci1 4988 — 7y
0
Username Nik1080 24 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

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.

Ad

Answer this question