I'm trying to make one of those barista uniform things for a client and this seems to only work in studio:
local b = script.Parent local plr = b.Parent.Parent.Parent.Parent plr.CharacterAdded:wait() local char = plr.Character local shirtID = 169511223 local pantID = 0 b.MouseButton1Click:connect(function() if char:FindFirstChild("Shirt") then local v = char:FindFirstChild("Shirt") v.ShirtTemplate = "http://www.roblox.com/asset/?id="..shirtID else local s = Instance.new("Shirt", char) s.ShirtTemplate = "http://www.roblox.com/asset/?id="..shirtID s.Name = "Shirt" end end) b.MouseButton1Click:connect(function() if char:FindFirstChild("Pants") then local v = char:FindFirstChild("Pants") v.PantsTemplate = "http://www.roblox.com/asset/?id="..pantID else local s = Instance.new("Pants", char) s.PantsTemplate = "http://www.roblox.com/asset/?id="..pantID s.Name = "Pants" end end)
I do not know why