EDIT Just had to change GetRoleInGroup to GetRankInGroup. ^^
Hello ScriptingHelpers.
I just created a script to see that it is not working. My script is supposed to give a taser and a railgun to the people in the required roll in the group which is 12 and above. These are the trainers.
When I run the script, I get this error on line 4:- attempt to compare number with string
Here is the script:- ( Ps, not sure if the green bits are true. I wrote them as accurately as possible. )
game.Players.PlayerAdded:connect(function(p) -- Sees if a player joins.
p.CharacterAdded:connect(function() -- When the character is added.
RN = p:GetRoleInGroup(1240173) -- Sees if the player is in the group.
if RN >= 12 then -- If the player is in the roll 12 or above (trainer).
game.ServerStorage.Taser:Clone().Parent = p.Backpack -- Gives tools.
game.ServerStorage.Railgun:Clone().Parent = p.Backpack -- Gives tools.
end
end)
end)
Thanks if you helped! :]

3 comments
Thanks for helping, unfortunately it's still not working. :( It gives an error on line 3: attempt to compare number with nil
Figured it out, just had to change your line 3 to GetRankInGroup! :) Thanks!
Sorry I couldnt change it before you seen the bug, but its hard to do that stuff on tablet.. >:/ But thanks for understanding.. :)