The button works fine (I tested it) but the rest won't for some reason.
function leftClick()
local function replaceClothes(player)
local character = player.Character
if character then
local shirt = character:FindFirstChildOfClass("Shirt")
local pants = character:FindFirstChildOfClass("Pants")
if not shirt then
shirt = Instance.new("Shirt", character)
end
if not pants then
pants = Instance.new("Pants", character)
end
shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=83326831"
pants.PantsTemplate = "http://www.roblox.com/asset/?id=10045638"
end
end
end
script.Parent.MouseButton1Click:Connect(leftClick)

2 comments
I've made a morph button and it didn't need a RemoteEvent.
ok, and?