Basically what I am looking for is a way for a high role's rank in a roblox group to not have to wear set clothes it's team has been given but make the lower rank still wear them. I am quite new to scripting and I am trying to figure this out with no luck.
https://i.gyazo.com/29f78714c9ccb372759662bf2581bb21.png Linking the page doesn't work for some reason so I kept it like this
local players = game:GetService("Players")
players.PlayerAdded:Connect(function(p)
p.CharacterAdded:Connect(function(Char)
local Folder = script:FindFirstChild(p.Team.Name)
if Folder then
local Tools = Folder:FindFirstChild("Tools")
if Tools then
for i,v in pairs(Tools:GetChildren())do
v:Clone().Parent = p.Backpack
end
end
local Clothes = Folder:FindFirstChild("Clothes")
if Clothes then
for i,v in pairs(Clothes:GetChildren()) do
local Clothing = Char:WaitForChild(v.Name)
if Clothing then
Clothing:Destroy()
end
v:Clone().Parent = Char
end
end
end
end)
end)
