script.Parent.Touched:connect(function(hit)
local hum = hit.Parent:FindFirstChild("Humanoid")
if hum ~= nil then
local rank = game.Players[hit.Name]:GetRankInGroup(groupid)
if rank == "" then
end
end
end)
I need this implementing so that when you touch the brick it kills you if not between the given ranks in the specific group.
pnts = script.Pants
shirt = script.Shirt
function GiveClothes(character)
if not character:findFirstChild("Shirt") then
shirt:Clone().Parent = character
else character:findFirstChild("Shirt"):Destroy()
shirt:Clone().Parent = character
end
if not character:findFirstChild("Pants") then
pnts:Clone().Parent = character
else character:findFirstChild("Pants"):Destroy()
pnts:Clone().Parent = character
end
end
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(char)
wait(1.12)
local plr = game.Players:findFirstChild(char.Name)
print(char.Name)
if plr.TeamColor ~= BrickColor.new("Dark blue") then
return
else GiveClothes(char)
end
end)
end)
This script has a similar issue, it works and gives the players the correct clothes but I need to edit it so that if you are a specific rank in a group your given a different set of clothes, it could be in multiple scripts.
