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

Change Clothe when Spawn? [closed]

Asked by 6 years ago

So i want to create a script that change shirt , pant , hat when someone Spawn in the game but i cant find a way to do that so if you know tell me :D Thx

Closed as Not Constructive by Gey4Jesus69 and evaera

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 6 years ago

The things you will need to learn about are listed below:

You can learn how to give a player hat here

Inside a script in game.ServerScriptService

01local function PlayerAdded(Player)
02 
03    Player.CharacterAdded:Connect(function(Character) -- use an Anonymous function for this
04 
05        local Shirt = Character:WaitForChild("Shirt") -- will wait until Shirt is found
06        local Pants = Character:WaitForChild("Pants") -- do the same for pants
07 
08        Shirt.ShirtTemplate = "rbxassetid://id" -- change id with the id of the shirt you want to use
09        Pants.PantsTemplate = "rbxassetid://id" -- do the same as you would shirt but with pants
10 
11    end)
12 
13end
14 
15game.Players.PlayerAdded:Connect(PlayerAdded) -- when player joins the function PlayerAdded will call
Ad