I have this group and I want this specific rank to have a gun in-game. But it has to be only that rank.
This script should work on respawn, only the rank and group id specified will get the item.
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) if player:GetRankInGroup(000000) >= 000 then --Change to GroupId and Rank Number. game.ServerStorage.GUNNAMEHERE:Clone().Parent = player:WaitForChild("Backpack") end end) end)
This isn't that hard if you take the time to read through the Wiki.
id = 1337 --Group ID rank = 1 --The Role of the rank game.Players.PlayerAdded:connect(function(plr) if plr:IsInGroup(id) and plr:GetRankInGroup(id) == rank then --Change it to >= if you want to be all ranks above as well. repeat wait() until plr.Backpack tool = game.ServerStorage["Tool name here"]:clone() tool.Parent = plr.Backpack --tool.Parent = plr.StarterGear --Above is if you want it to stay with them end end)
-Thank me by accepting this answer/bumping up my reputation!