Seeumliam
|
  |
| Joined: 06 May 2013 |
| Total Posts: 5662 |
|
|
| 18 Jul 2014 02:33 PM |
| How would I change a player shirt in game using a gui? Would I put a shirt template in the gui aand when gui is clicked it would change the player shirt? |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
| |
|
azabat
|
  |
| Joined: 28 Mar 2008 |
| Total Posts: 29 |
|
|
| 18 Jul 2014 03:02 PM |
Parent structure Players -> Player -> PlayerGui -> ScreenGui -> GuiButton ->Script
Make a shirt object with the AssetID and put it into the Lighting. Name it something (In this case, I named it ShirtNameGoesHere)
Put this inside the GuiButton
player = script.Parent.Parent.Parent.Parent.Character debounce = true function onClick() if debounce ~= true then return end debounce = false for i,v in pairs(player:GetChildren()) do if v:IsA("Shirt") then player:findFirstChild("Shirt"):Destroy() end end game.Lighting.ShirtNameGoesHere:clone().Parent = player debounce = true end script.Parent.MouseButton1Click:connect(onClick) |
|
|
| Report Abuse |
|
|
azabat
|
  |
| Joined: 28 Mar 2008 |
| Total Posts: 29 |
|
|
| 18 Jul 2014 03:05 PM |
Oh yeah, you could probably just keep the Shirt object inside the GuiButton.
So you could change game.Lighting.ShirtNameGoesHere:clone().Parent = player to script.Parent.ShirtNameGoesHere:clone().Parent = player
|
|
|
| Report Abuse |
|
|