I would like this to work as a uniform GUI for my group.
Problem: It is only working client side when I need everyone to see it.
local Player = game:GetService("Players").LocalPlayer
local Uniform = {}
Uniform.Shirt = "http://www.roblox.com/asset/?id="
Uniform.Pants = "http://www.roblox.com/asset/?id="
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
local Bin = script.Parent
if Bin:IsA("TextButton") or Bin:IsA("ImageButton") then
Bin.MouseButton1Down:connect(function()
AddUniform(Player)
wait()
script.Parent.Parent.Parent:remove()
end)
end
Setup:
![]()
Is it just that I need to make the local script a normal script?