The reason why your script won't work is actually very simple, by doing Player:GetRoleInGroup it would print out the name of the role they have in the group, if you wanted to get the number corresponding to their role, you would do :GetRankInGroup. If you take this into account, the script would look like this.
01 | local Pants = script.Pants |
02 | local Shirt = script.Shirt |
04 | local GroupID = 6763603 |
06 | script.Parent.ClickDetector.MouseClick:connect( function (Player) |
07 | if not Player:IsInGroup(GroupID) then return end |
08 | if Player:GetRankInGroup(GroupID) < 50 then return end |
09 | local Character = Player.Character |
10 | if Character = = nil then return end |
13 | local CharacterShirt = Character:findFirstChild( "Shirt" ) |
14 | if CharacterShirt then CharacterShirt:Destroy() end |
15 | Shirt:Clone().Parent = Character |
18 | local CharacterPants = Character:findFirstChild( "Pants" ) |
19 | if CharacterPants then CharacterPants:Destroy() end |
20 | Pants:Clone().Parent = Character |