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

Give people a shirt,pants and hat as soon as they join a game?

So how would I do this? If you could provide me the full script that would be great.

2 answers

✓ Accepted answer

All characters have Shirts and Pants inside them, unless they are using a package like me.

Click for the Character

We can set their textures using -

Shirt Template and Pants Template

So, therefore, this script will work.

local shirtemplate = "id here"
local pantstemplate = "id here"
local hats = {"hat 1 id","hat 2 id","hat 3 id","even a hat 4 id"}

function giveShirtAndPants(p)
	local c = p.Character
	c.Shirt.ShirtTemplate = shirtemplate
	c.Pants.PantsTemplate = shirtemplate
	for _,v in pairs(hats) do
		local hat = game:GetService("InsertService"):LoadAsset(v).Parent = c
	end
end

game.Players.PlayerAdded:connect(function(p)
	repeat wait() until p ~= nil
	repeat wait() until p.Character ~= nil
	giveShirtAndPants(p)
	p.CharacterAdded:connect(function(c)
		repeat wait() until c ~= nil
		giveShirtAndPants(p)
	end)
end)

3 comments

0

What about the hat?

0

Sorry, let me edit that into the script

0

Try that, not sure if the hat bit will work yet :p

You could do this without a script, Just a morph. Make the morph of what you want people to look like and make it transparent and have a spawn point under it. So they get the clothes, hats exc and spawn where they want with no complex scripting.

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