Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Click for clothes gui not working?

Asked by 10 years ago

I've been trying to get this gui to work for it to be able to change someone pants and shirt when they click

Here's what ive been doing:


player=game.Players.LocalPlayer button.MouseButton1Down:connect(function() if player.Character:findFirstChild("Shirt") then player.Character.Shirt.ShirtTemplate="http://www.roblox.com/asset/?id=147660556" else local s = Instance.new("Shirt", player.Character) s.ShirtTemplate="http://www.roblox.com/asset/?id=147660556" end if player.Character:findFirstChild("Pants") then player.Character.Pants.PantsTemplate="http://www.roblox.com/asset/?id=160568738" else local p = Instance.new("Pants", player.Character) player.Character.Pants.PantsTemplate="http://www.roblox.com/asset/?id=160568738" end

1 answer

Log in to vote
0
Answered by 10 years ago

Make sure it's a local script and add wait(.5) at the top

Ad

Answer this question