Quirtx
|
  |
| Joined: 01 Aug 2014 |
| Total Posts: 522 |
|
|
| 13 May 2017 03:58 AM |
Hello! I have a GUI that I want to be group only with the rank above 100 (<100). If you are not above it will script.Parent:Destroy()... Help? |
|
|
| Report Abuse |
|
|
Quirtx
|
  |
| Joined: 01 Aug 2014 |
| Total Posts: 522 |
|
|
| 13 May 2017 03:59 AM |
| This is what I did: groupid = ####### game.Players.PlayerAdded:connect(function(plr) if plr:IsInGroup(groupid) and plr:GetRankInGroup(groupid) # ### then else script.Parent:Destroy() end end) |
|
|
| Report Abuse |
|
|
Quirtx
|
  |
| Joined: 01 Aug 2014 |
| Total Posts: 522 |
|
|
| 13 May 2017 03:59 AM |
| groupid = ####### game.Players.PlayerAdded:connect(function(plr) if plr:IsInGroup(groupid) and plr:GetRankInGroup(groupid) # ### then else script.Parent:Destroy() end end) |
|
|
| Report Abuse |
|
|
Quirtx
|
  |
| Joined: 01 Aug 2014 |
| Total Posts: 522 |
|
| |
|
|
| 13 May 2017 04:04 AM |
Put that in the GUI in a local script.
|
|
|
| Report Abuse |
|
|
Quirtx
|
  |
| Joined: 01 Aug 2014 |
| Total Posts: 522 |
|
|
| 13 May 2017 04:08 AM |
| Did but still not working?!? |
|
|
| Report Abuse |
|
|
|
| 13 May 2017 04:08 AM |
| It looks good, where does this code run though? |
|
|
| Report Abuse |
|
|
Quirtx
|
  |
| Joined: 01 Aug 2014 |
| Total Posts: 522 |
|
|
| 13 May 2017 04:09 AM |
| after (and plr:GetRankInGroup(groupid)) it says < 100 |
|
|
| Report Abuse |
|
|
|
| 13 May 2017 04:10 AM |
If you want it inside a LocalScript:
groupid = 010101010
local plr = game.Players.LocalPlayer if plr:GetRankInGroup(groupid) < 100 then -- You don't need to check if they are in the group, since everyone who isn't has a 0 rank script.Parent:Destroy() end |
|
|
| Report Abuse |
|
|
Quirtx
|
  |
| Joined: 01 Aug 2014 |
| Total Posts: 522 |
|
|
| 13 May 2017 04:11 AM |
| Ok! Thanks will give it a go. |
|
|
| Report Abuse |
|
|
Quirtx
|
  |
| Joined: 01 Aug 2014 |
| Total Posts: 522 |
|
|
| 13 May 2017 04:14 AM |
| Worked! Cheers guys your the best <3 |
|
|
| Report Abuse |
|
|
Quirtx
|
  |
| Joined: 01 Aug 2014 |
| Total Posts: 522 |
|
| |
|