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

Click for clothes gui not working?

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

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

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