GiveClothes = function(char) for i,v in pairs(char:children()) do if v:IsA("Clothing") then v:Destroy() end end script.Pants:Clone().Parent = char script.Shirt:Clone().Parent = char end GroupId = 0 RanksThatGetClothing = {"Private"} game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(char) local allowed = false for i,v in pairs(RanksThatGetClothing) do if v:GetRoleInGroup(GroupId) == v then allowed = true end end if allowed then GiveClothes(char) end end) end)
First off: Change all of the :connect to :Connect Put it all in a code block so I can see everything else
GiveClothes = function(char) for i,v in pairs(char:children()) do if v:IsA("Clothing") then v:Destroy() end end script.Pants:Clone().Parent = char script.Shirt:Clone().Parent = char end GroupId = 0 RanksThatGetClothing = {"Private"} game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(function(char) local allowed = false for i,v in pairs(RanksThatGetClothing) do if v:GetRoleInGroup(GroupId) == v then allowed = true end end if allowed then GiveClothes(char) end end) end)
maybe because you left the group id to 0 ://////////////////////////