Alright, so, I can equip multiple outfits, which I only want one to equip and the other one to de-equip with the color changing to the un-equip color. Basically only having one sloth to equip and not multiple.
Script:
local module = {}
isEquipped = not isEquipped
function module:Init()
local Uniform = game:GetService("ReplicatedStorage").Remotes.Uniform
Uniform.OnServerEvent:Connect(function(Player, oldOutfit, ShirtId, PantId, Frame)
local Character = Player.Character
if isEquipped then
Character.Shirt.ShirtTemplate = ShirtId
Character.Pants.PantsTemplate = PantId
print("Equipped uniform")
Frame.BackgroundColor3 = Color3.fromRGB(85, 255, 0)
else
Character.Shirt.ShirtTemplate = oldOutfit[1]
Character.Pants.PantsTemplate = oldOutfit[2]
print("Default clothes equipped")
Frame.BackgroundColor3 = Color3.fromRGB(90, 170, 215)
end
isEquipped = not isEquipped
end)
end
return module