game.Players.PlayerAdded:Connect(function(player)
local Rank = player:GetRoleInGroup(4937707)
if Rank == (150) then
print("test")
end
end)
It doesn't print anything on my screen.
game.Players.PlayerAdded:Connect(function(player)
local Rank = player:GetRoleInGroup(4937707)
if Rank == (150) then
print("test")
end
end)
It doesn't print anything on my screen.
Maybe this could work?
game.Players.PlayerAdded:Connect(function(player)
local Rank = player:GetRankInGroup(4937707)
print(Rank)
if Rank == 150 then
print("test")
end
print("2")
end)
you can remove the print statements i just used it to get info. it worked for a random group i was in / you just needed to remove the brackets around 150
or you could try:
game.Players.PlayerAdded:Connect(function(player)
local Rank = player:GetRoleInGroup(4937707)
print(Rank)
if Rank == "ROLENAME" then
print("test")
end
print("2")
end)
game.Players.PlayerAdded:Connect(function(player)
local Rank = player:GetRankInGroup(4937707)
if Rank == (150) then
print("test")
end
end)
You were using the wrong function, use GetRankInGroup not GetRoleInGroup.
Still not working..
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
perhaps try printing the Rank outside the if statement..?
Idk.. Neither of GetRoleInGroup or GetRankInGroup worked..