So I'm fixing my whitelist and here's my code so far:
game.Players.PlayerAdded:connect(function(p) if game.CreatorType == Enum.CreatorType.Group then Group = game.CreatorId print('yes') print(Group) end
Now this issue with this is I want to figure out if the player is the owner of the group, if the player isn't, I return. If it is, a value will be checked. I added just one line which is as follows.
elseif p:GetRankInGroup(Group) == 255 then
So the code looks like this
game.Players.PlayerAdded:connect(function(p) if game.CreatorType == Enum.CreatorType.Group then Group = game.CreatorId elseif p:GetRankInGroup(Group) == 255 then print('yes') print(Group) end
But when I publish the module, it doesn't print the group id or yes. How can I fix this?
Okay hopefully I understood this right. You are trying to get to get the rank of a player in a group, then print yes and the groupId.
It seems the only issue was the formatting of the script. I reformatted the script.
game.Players.PlayerAdded:connect(function(p) if game.CreatorType == Enum.CreatorType.Group then local Group = game.CreatorId if p:GetRankInGroup(Group) == 255 then print('yes') print(Group) end end end)
I tested this out in one of my games and it seems to work. Hope this helps!