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

Why is this group rank only tool script not working? - Thanks :)

Asked by 2 years ago
Edited 2 years ago

Like the title says, the script is meant to give them certain tools on the game but for some reason it isn't working. Any help is appreciated thanks.

local Folder = game.ServerStorage.ToolStorage
local Debit = Folder["Debit Card "]
local Access = Folder["Access Card"]
local Fire = Folder["Armodia FireKey"]
local Search = Folder["EAS Search Tool"]
local Cuffs = Folder["HandCuffs"]
local TestTag = Folder["JSM Test Tag"]
local SelfServ = Folder["JSM Self-Serv Key "]
local Phone = Folder["Phone"]
local Barcode = Folder["[JSM] Operator Barcode"]


game.Players.PlayerAdded:connect(function(player)
    if player:GetRankInGroup(13874159) >= 0 and player:GetRankInGroup(13874159) <2 then --Guest and Customer
        local a = Debit:Clone()
        a.Parent = player.Backpack
    elseif player:GetRankInGroup(13874159) >= 236 and player:GetRankInGroup(13874159) <240 then-- Security Guards
        local a = Debit:Clone()
        a.Parent = player.Backpack
        local b = Access:Clone()
        b.Parent = player.Backpack
        local c = Search:Clone()
        c.Parent = player.Backpack
        local d = Cuffs:Clone()
        d.Parent = player.Backpack
    elseif player:GetRankInGroup(13874159) >= 240 and player:GetRankInGroup(13874159) <244 then -- Trainee and Store Colleagues
        local a = Debit:Clone()
        a.Parent = player.Backpack
        local b = Access:Clone()
        b.Parent = player.Backpack
        local c = TestTag:Clone()
        c.Parent = player.Backpack
        local d = Barcode:Clone()
        d.Parent = player.Barcode
    elseif player:GetRankInGroup(13874159) >= 244 and player:GetRankInGroup(13874159) <248 then -- Supervisors
        local a = Debit:Clone()
        a.Parent = player.Backpack
        local b = Access:Clone()
        b.Parent = player.Backpack
        local c = TestTag:Clone()
        c.Parent = player.Backpack
        local d = Barcode:Clone()
        d.Parent = player.Barcode
        local e = SelfServ:Clone()
        e.Parent = player.Backpack
    elseif player:GetRankInGroup(13874159) >= 248 then -- Management and Higher
        local a = Debit:Clone()
        a.Parent = player.Backpack
        local b = Access:Clone()
        b.Parent = player.Backpack
        local c = TestTag:Clone()
        c.Parent = player.Backpack
        local d = Barcode:Clone()
        d.Parent = player.Barcode
        local e = SelfServ:Clone()
        e.Parent = player.Backpack
        local f = Search:Clone()
        f.Parent = player.Backpack
        local g = Cuffs:Clone()
        g.Parent = player.Backpack
        local h = Phone:Clone()
        h.Parent = player.Backpack
    elseif player:GetRankInGroup(13874159) >= 252 then -- Directors
        local a = Debit:Clone()
        a.Parent = player.Backpack
        local b = Access:Clone()
        b.Parent = player.Backpack
        local c = TestTag:Clone()
        c.Parent = player.Backpack
        local d = Barcode:Clone()
        d.Parent = player.Barcode
        local e = SelfServ:Clone()
        e.Parent = player.Backpack
        local f = Search:Clone()
        f.Parent = player.Backpack
        local g = Cuffs:Clone()
        g.Parent = player.Backpack
        local h = Phone:Clone()
        h.Parent = player.Backpack
        local i = Fire:Clone()
        i.Parent = player.Backpack
    end
end)

Any help is appreciated. Also the group id is 13874159 and the Game iD is 9101331434 if that helps - thanks.

Also, game.ServerStorage.ToolStorage does exist and we put all the tools in there :)

0
Hi, anyone who may look at this - i just decided to put the tools into the Teams instead. I added a kill script on join script and somehow it prevented people from getting the tools they weren't meant to have - this was my solution User#47213 0 — 2y

1 answer

Log in to vote
0
Answered by 2 years ago

Hi, anyone who may look at this - i just decided to put the tools into the Teams instead. I added a kill script on join script and somehow it prevented people from getting the tools they weren't meant to have - this was my solution

Ad

Answer this question