Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do I give different loadouts for group ranks?

Asked by 4 years ago

I have been working on a roleplay game that is closely related to my group. I have figured out how to make a script that puts group roles on different team, and I know how to give that a different loadout.

game.Players.PlayerAdded:connect(function(newPlayer)
    local rank = newPlayer:GetRankInGroup(3803596)
    local teamName = ""
    if rank >= 200 then
        teamName = "Executive"
    elseif rank == 4 then
        teamName = "Operatives"
    elseif rank == 3 then
        teamName = "Junior Operatives"
    elseif rank == 2 then
        teamName = "Trainees"
    end
    newPlayer.TeamColor = game.Teams[teamName].TeamColor
end)

But, I was wondering if there was a way, that group ranks could have their own loadout, but still be on the sane team.

0
All you'd really have to do is create a separate script giving people weapons, and keep that script that gives them their team. ParticularlyPenguin 71 — 4y

1 answer

Log in to vote
0
Answered by
imKirda 4491 Moderation Voter Community Moderator
4 years ago

Put the tools you need somewhere into Replicated Storage and put these lines into that script for each team:

team = "Executive" 
local tool = game.ReplicatedStorage:WaitForChild"tool":Clone()
tool.Parent = player:WaitForChild"StarterGear"

simple script, hope it helps.

0
What I meant, was can they have different loadouts, but all be on the same team? Like can someone with rank 10, and someone with rank 15 have different gear, but be on the same team? SlowNonCreeper007 -3 — 4y
Ad

Answer this question