Code :
script.Parent.MouseButton1Click:connect(function() local plr = game.Players.LocalPlayer local Shirt = "http://www.roblox.com/asset/?id=128133687" local Pants = "http://www.roblox.com/asset/?id=128133700" plr.Shirt = "http://www.roblox.com/asset/?id=128133687" plr.Pants = "http://www.roblox.com/asset/?id=128133700" end)
To create an object you need to use Instance.new(object's class name, it's parent)
The shirt and pants are part of the character model and not the player instance. In addition, you need to change the ShirtTemplate
property of the shirt. This would like this:
script.Parent.MouseButton1Click:connect(function() local plr = game.Players.LocalPlayer local char = plr.Character or plr.CharacterAdded:wait() local Shirt = "http://www.roblox.com/asset/?id=128133687" local Pants = "http://www.roblox.com/asset/?id=128133700" if char:FindFirstChild("Shirt") then char.Shirt.ShirtTemplate = Shirt else local newShirt = Instance.new("Shirt") newShirt.Parent = char newShirt.ShirtTemplate = Shirt end if char:FindFirstChild("Pants") then char.Pants.PantsTemplate = Pants else local newPants = Instance.new("Pants") newPants.Parent = char newPants.PantsTemplate = Pants end end)