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

Script fail... Group rank tool giver not working? SOLVED

Asked by 5 years ago
Edited 5 years ago

Hey does anyone know why this does not create output and doesn't error or give the tools?

local groupid = 3719230

game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:connect(function()
        warn('Checking for group..')
        if plr:IsInGroup(groupid) and plr:GetRankInGroup(groupid) >= 254 then
            warn('Attempting to give tools')
            game.ServerStorage.Handcuffs:Clone().Parent = plr.Backpack
            game.ServerStorage["Security Taser"]:Clone().Parent = plr.Backpack
        end
    end)
end)

Help is needed, URGENTLY! I'm making a game for my friend and there is a dead line :(

Many thanks, Chris

0
Did you want to give that tools to owner of the group? HaveASip 494 — 5y
0
Me and the owner, (co owners and owner) ChrisThrRoblox1234 12 — 5y
0
does the warn statement show up in output? Vulkarin 581 — 5y
0
Try having only the warn() in the if statement to debug this. If it works then it's because line 8-9 might not be finding the correct objects. If not then your groupid value is wrong or they are a lower rank than 254. xPolarium 1388 — 5y
0
Check if the script is running, print something on line 1. If not it's either disabled or misplaced. Check the wiki as to where the different types scripts need to be placed to run. gullet 471 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

It suddenly started working when i put prints in it. Thanks a bundle gullet.

Ad

Answer this question