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

Guys can someone help me making this? visit the page and see.

Guys I want the people who join my game start on a suit from the game... Can you help me?

3 answers

ShirtID = 0000000
PantID = 0000000

Uniform = function(Char)
	local s = Instance.new("Shirt",Char)
	s.ShirtTemplate = ShirtID
	local p = Instance.new("Pants",Char)
	p.PantsTemplate = PantID
end

game.Players.ChildAdded:connect(function(Plr) --Child added used for use in studio
	repeat wait() until Plr.Character
	repeat wait() until Plr.Character:FindFirstChild("Head")
	repeat wait() until Plr.Character:FindFirstChild("Torso")
	wait(1)
	if Plr.Character:FindFirstChild("Shirt") then
		Plr.Character.Shirt:Destroy()
	end
	if Plr.Character:FindFirstChild("Pants") then
		Plr.Character.Pants:Destroy()
	end
	Uniform(Plr.Character)
	Plr.CharacterAdded:connect(function(Char)
		repeat wait() until Char:FindFirstChild("Head")
		repeat wait() until Char:FindFirstChild("Torso")
		wait(1)
		if Char:FindFirstChild("Shirt") then
			Char.Shirt:Destroy()
		end
		if Char:FindFirstChild("Pants") then
			Char.Pants:Destroy()
		end
		Uniform(Char)
	end)
end)

This might work...

Hey... I don't know I joined but It removes the player cloth and didn't add the shirt and pants..

You need to edit the following for it to work:

ShirtID = 0000000
PantID = 0000000

The IDs are located in the link of the shirt/pants.

1 comment

0

Oh ty :D

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