You can write your topic however you want, but you need to answer these questions:
-
A team only group rank set of tools, it wordked before but it was giving tools to ALL the players that meet te requierments, but now i changed it a bit for only a team only. I did some playtest, nothing in the output.
-
I can’t get this to work.
-
I asked some friends, but nothing so far.
local Players = game:GetService("Players")
local GrpId = 0-- Already changed
local Items = {
["WPN1"] = game.ServerStorage["AR"],
["WPN2"] = game.ServerStorage["Pistol"],
["WPN3"] = game.ServerStorage["SMG"],
}
local RankItems = {
[150] = {"WPN1", "WPN2", "WPN3"},
[160] = {"WPN1", "WPN2", "WPN3"},-- Team with 10 rank match
[170] = {"WPN1", "WPN2", "WPN3"},
[180] = {"WPN1", "WPN2", "WPN3"},
[190] = {"WPN1", "WPN2", "WPN3"},
[255] = {"WPN1", "WPN2", "WPN3"},
}
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function()
local GroupRank = Player:GetRankInGroup(GrpId)
if Player.Team == game.Teams.Team then -- Already changed.
elseif RankItems[GroupRank] then
for _, item in pairs(RankItems[GroupRank]) do
Items[item]:Clone().Parent = Player.Backpack
end
end
end)
end)