Kasumo
|
  |
| Joined: 22 Mar 2013 |
| Total Posts: 2467 |
|
|
| 13 Jul 2013 03:28 PM |
--Why doesn't this give assigned clothing to everyone except the ranks inside the table? Can't figure out the problem.
AllowedRanks = {"Head Captain, Squad 1 Captain, Squad 2 Captain"} function CheckRank(Player) if Player:IsInGroup(864602) == false then return false end for _, v in pairs(AllowedRanks) do if string.find(Player:GetRoleInGroup(864602), v) ~= nil then return true end end return false end
function removeClothes(Model) for i, v in pairs(Model:GetChildren()) do if v:IsA("Shirt") or v:IsA("ShirtGraphic") or v:IsA("Pants") then v:Destroy() end end end
game.Players.PlayerAdded:connect(function(newPlayer) newPlayer.CharacterAdded:connect(function(Character) if newPlayer:IsInGroup(864602) then if not CheckRank(newPlayer) then removeClothes(Character) local shirt = Instance.new("Shirt", Character) local pants = Instance.new("Pants", Character) shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=111034417" pants.PantsTemplate = "http://www.roblox.com/asset/?id=103352376" end end end) end) game.Players.PlayerAdded:connect(onPlayerEntered) |
|
|
| Report Abuse |
|
789cab
|
  |
| Joined: 13 Jul 2009 |
| Total Posts: 3145 |
|
|
| 13 Jul 2013 03:30 PM |
| Put the number of the rank instead of the name like you know in the group admin next to the name it says something about 255 for your rank. |
|
|
| Report Abuse |
|