Like for example I'm trying to make a soccer game, and I want a player to choose their own shorts and shirt for the game. And I want the labels to look like the shirts and the pants. How would the script look like?
✓ ANSWER ACCEPTED
How do I make a GUI, that when a player enters a game he gets to choose clothing?
2 answers
✓ Accepted answer
You can easily get one of these scripts in free models and tweak it a bit, but... I copied this code from a free model.
script.Parent.MouseButton1Down:connect(function()
playername = script.Parent.Parent.Parent.Parent.Name
player = Workspace:FindFirstChild(""..playername.."")
if player ~= nil then
player:FindFirstChild("Pants").PantsTemplate = "http://www.roblox.com/asset/?id=123456789" -- Pants ID here
player:FindFirstChild("Shirt").ShirtTemplate = "http://www.roblox.com/asset/?id=123456789"-- Shirt ID here
end
end)
if you don't want a shirt or pants both, delete one of the lines. Put that code in a GUI button and decorate it all you want! :D I hope this helped!
Try using this model that I made.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Is it a local script?