So I'm currently working on a Uniform GUI for a United States Military group. I need some help as I have this script here that puts the uniforms on, but other players see you without clothes.
local Player = game:GetService("Players").LocalPlayer
local Player = game:GetService("Players").LocalPlayer
--Settings--
local Uniform = {}
Uniform.Shirt = "rbxassetid://628306291"
Uniform.Pants = "rbxassetid://628306191"
--function--
function AddUniform(P)
local Character = P.Character
repeat wait(0) until Character ~= nil
for i,Object in next,Character:GetChildren() do
if Object:IsA("Shirt") or Object:IsA("Pants") then
Object:Destroy()
end
end
local Shirt = Instance.new("Shirt",Character)
Shirt.ShirtTemplate = Uniform.Shirt
local Pants = Instance.new("Pants",Character)
Pants.PantsTemplate = Uniform.Pants
end
--GUIPart--
local Bin = script.Parent
if Bin:IsA("TextButton") or Bin:IsA("ImageButton") then
Bin.MouseButton1Down:connect(function()
AddUniform(Player)
end)
end

1 comment
Look at remote events. Use FireServer() and then send out the rbxassetids.