Uniform equipment gui button

Hello! I was wondering how I could make it so when a player clicks an gui button on my equipper they would get a roblox shirt and pants on.

Photo of where the button is located in click here

Thank you!

A player has a Shirt object in their character model. This Shirt object also has a ShirtTemplate property which holds the shirt’s template URL. You can learn more here.

No… I mean like when you click the gui button the shirt and pants go on-

Yes. It should work like this.
You mean, when you click the button the shirt and pants should change, right?
If so this script will work (Put inside the button)

local player = nil --change this to the player
local character = player.Character or player.CharacterAdded:Wait()
local shirtUrl = nil --change this to the shirt's template url
local pantsUrl = nil --change this to the pants' template url

script.Parent.MouseButton1Click:Connect(function()
    if character:FindFirstChild("Shirt") then
        character.Shirt.ShirtTemplate = shirtUrl
    else
        local shirt = Instance.new("Shirt", character)
        shirt.ShirtTemplate = shirtUrl
    end
    if character:FindFirstChild("Pants") then
         character.Pants.PantsTemplate = pantsUrl
    else
         local pants = Instance.new("Pants", character)
         pants.PantsTemplate = shirtUrl
    end
end)

Change the variables to what they should be changed to. Tell me if there is any errors.

Edit: Tested and works.

1 Like