I basically setup something to dupe uniforms from ServerStorage for members on GUI click. However, once I added in the :GetRankInGroup portion it ceased working, however worked perfectly fine before? Getting an Error (134,39) expected "end to close function"
local player = game:GetService("Players").LocalPlayer
local character = player.Character
local Uniform = game.ServerStorage.Armor["TRC"].Standard["Standard - Cadet"].Clothing
function Click()
if player:GetRankInGroup(1236263) >= 1 and player:GetRankInGroup(1236263)<= 255 then
local hU = character:findFirstChild("Humanoid")
if hU~=nil then
local s = character:findFirstChild("Shirt")
if s~=nil and y~=nil then
character.Shirt:remove()
Uniform.Shirt:clone().Parent = character
elseif s~=nil then
character.Shirt:remove()
Uniform.Shirt:clone().Parent = character
elseif y~=nil then
character.Shirt:clone().Parent = character
elseif s==nil and y==nil then
character.Shirt:clone().Parent = character
end
end
end
User.MouseButton1Click:connect(Click)
Above is all the code. I didn't forget anything major did I? I mean I am fairly certain I wrote that right and it has an end function. So I don't understand as to why I am getting a script error.

1 comment
This is why it is important to tab your code correctly.