Coogylox
|
  |
| Joined: 05 Jan 2010 |
| Total Posts: 38 |
|
|
| 05 Apr 2014 01:50 AM |
I have a helmet for this group I am in. It works, but I want to make certain helms only available to certain ranks. So far, I have this:
groupid="0000000" b=script.Parent r=true b.Touched:connect(function(t) p=game.Players:getPlayerFromCharacter(t.Parent) if p then if p:IsInGroup(groupid)then if r then r=false for i=1,10 do wait(.1) b.Transparency=i/10 end b.CanCollide=false wait(2) for i=1,10 do wait(.1) b.Transparency=1-(i/10) end r=true end else h=p.Character:findFirstChild"Humanoid" if h then h.Health=0 end end end end)
However, that lacks anything to check rank. Does anyone know what to do to make it check for a certain rank or higher than that rank to allow one to use the helm? |
|
|
| Report Abuse |
|
|
|
| 05 Apr 2014 04:29 AM |
groupid="0000000" b=script.Parent r=true b.Touched:connect(function(t) p=game.Players:getPlayerFromCharacter(t.Parent) if p.Parent.Humanoid ~= nil then if p:IsInGroup(groupid)then if r then r=false for i=1,10 do wait(.1) b.Transparency=i/10 end b.CanCollide=false wait(2) for i=1,10 do wait(.1) b.Transparency=1-(i/10) end r=true end else h=p.Character:findFirstChild("Humanoid") if h ~= nil then h.Health=0 end end end end) |
|
|
| Report Abuse |
|
|
Coogylox
|
  |
| Joined: 05 Jan 2010 |
| Total Posts: 38 |
|
|
| 05 Apr 2014 06:16 PM |
That doesn't check for rank withing a group. I need a script that will say something like:
if p:IsInGroup(groupid) then if p:RankInGroup(255) then
Something like that. It has to check for rank. |
|
|
| Report Abuse |
|
|
|
| 05 Apr 2014 06:18 PM |
if p:GetRankInGroup(groupid) >= rankrequired then
|
|
|
| Report Abuse |
|
|
Coogylox
|
  |
| Joined: 05 Jan 2010 |
| Total Posts: 38 |
|
| |
|
| |
|
|
| 06 Apr 2014 11:26 PM |
| (The reason I say that is remembering values which is which because youre script's variables is really unorganized.) |
|
|
| Report Abuse |
|
|
Coogylox
|
  |
| Joined: 05 Jan 2010 |
| Total Posts: 38 |
|
|
| 07 Apr 2014 06:28 PM |
| The p:GetRankInGroup deal didn't work. p3p |
|
|
| Report Abuse |
|
|
Coogylox
|
  |
| Joined: 05 Jan 2010 |
| Total Posts: 38 |
|
|
| 07 Apr 2014 06:33 PM |
| Nevermind. Put it in the wrong place. Thank you for all the help. |
|
|
| Report Abuse |
|
|