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

How do i have all players spawn with the same shirt and pants?

I need help figuring how how i could have players spawn with the same shirt and pants for a default outfit players will have and will soon be able to upgrade, but the thing is how do i spawn them with the same clothing?

2 answers

Inside each character model (the in-game avatar of the player), there are two objects: Shirt and Pants.

With the latest avatar update, they will be there even if the player is not wearing any.

All you need to do is set the ShirtTemplate and PantsTemplate properties of the objects to change what they are wearing.

-- assuming you have already defined the character

Character.Shirt.ShirtId = "rbxassetid://0000" -- where 0000 is the unique id for the shirt found in the URL

Character.Pants.PantsId = "rbxassetid://0000"

Hope I helped!

~TDP

Very loose code, I don't want to just write them for free. The idea would be this

function LoadClothes(player) -- run this on respawn or something
If not CheckDataMethod(player,clothes) then -- check to see if they upgraded
player.Character.Pants.PantsTemplet = PantstDecalID -- roblox has a good decal id wiki
player.Character.Shirt.ShirtTemplet = ShirtDecalID-- change shirt and pants decal ID to the one you want
else for I,v in pairs(CheckDataMethod(player,clothes) -- if they have saved clothes
character:FindFirstChild(i)[i.."Template"] = v -- find the saved name, and change the value
end
end-- assuming saved data for player[clothes] is set up like so{Shirt==194124,Pants=5158515}
end 

3 comments

1

Your code is complex and mostly unexplained. This is also not a website for free code - it is for helping people with their problems.

0

Because he asked for a very complex script. Not to fix an error, not a method, not math help. Just simple asked how to do something with multiple perimeters. He mentioned upgrading and such. My example would taught him more then the line you get if you google "how to change a shirt ID roblox"...

0

Bottom line is that it's, like TDP said, mostly unexplained. Beginners aren't going to understand this.

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