Ad
Log in to vote
-1

How do I make a GUI, that when a player enters a game he gets to choose clothing?

Asked by
2Busy 10
7 years ago

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?

2 answers

Log in to vote
0
Answered by 7 years ago

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!

0
Is it a local script? 2Busy 10 — 7y
Ad
Log in to vote
0
Answered by 7 years ago

Try using this model that I made.

Answer this question