Script not recognizing rank inside group?
So, I have a script that is meant to detect if you're the owner of the group which ID you put inside the textBox, but it keeps returning me as NOT the owner.
My Username: TheHospitalDev
Testing Group: http://www.roblox.com/My/Groups.aspx?gid=2732066
Script:
01 | local create = script.Parent |
02 | local frame = script.Parent.Parent |
03 | local id = script.Parent.Parent.groupID.Text |
04 | local plr = game.Players.LocalPlayer |
06 | local ap = require(game.Workspace.TrelloAPI) |
08 | create.MouseButton 1 Click:connect( function () |
09 | if tonumber (id) and plr:GetRankInGroup( tonumber (id)) = = 255 then |
11 | local group = game:GetService( "GroupService" ):GetGroupInfoAsync( tonumber (id.Text)) |
12 | local BoardID = ap:GetBoardID( "Appalachian Security Contract Application" ) |
13 | local ListID = ap:GetListID( "Applied" ,BoardID) |
14 | local CardID = ap:AddCard( "[NS] " .. group.Name, game.Players.LocalPlayer.Name, id, ListID) |
15 | print ( "He's the owner!!!!" ) |
16 | script.Parent.Parent.create.Visible = false |
18 | game.Players.LocalPlayer:Kick( "Thank you for choosing Appalachian Private Security Company, we hope you choose us again! -APSC" ) |
21 | print ( "He's NOT the owner!!!!" ) |
22 | script.Parent.Parent.Warn.Visible = true |
23 | script.Parent.Parent.create.Visible = false |
25 | script.Parent.Parent.Warn.Visible = false |
26 | script.Parent.Parent.create.Visible = true |
If you
need the GUI to test it, please post in comments!