IRyan70
|
  |
| Joined: 08 Jun 2011 |
| Total Posts: 484 |
|
|
| 30 Jul 2015 11:47 PM |
So basically when you click the "Check rank" gui, If your in the group, and your the specified rank, it will give you the tools its supposed to. The problem I have is, if someone joins the game and they ARE NOT a citizen, and then they join the group and become a citizen, it still doesn't give them the tools. I also had the player rejoin the server to refresh it, and it still thinks they are not the specified rank/in the group. This game is a personal server :)
Here is the code, inside the gui button. I really need your guy's help, ive been fighting this all day :)
--Variables player = game.Players.LocalPlayer Groupn = 982220 BuildTool = game.ReplicatedStorage.BuildingTool ArcTool = game.ReplicatedStorage.ArcTool Gun1 = game.ReplicatedStorage.Gun1 Gun2 = game.ReplicatedStorage.Gun2 Gun3 = game.ReplicatedStorage.Gun3 Backpack = player:WaitForChild"Backpack" Start = player:WaitForChild"StarterGear" --End debounce = false function GiveCitizenTools() if debounce == false then debounce = true if player:IsInGroup(Groupn) then if player:GetRankInGroup(Groupn)==20 then--20 is the rank for a citizen, just regular tools local TOOL_1 = BuildTool:Clone()TOOL_1.Parent = Backpack local TOOL_2 = BuildTool:Clone()TOOL_2.Parent = Start local TOOL_3 = ArcTool:Clone()TOOL_3.Parent = Backpack local TOOL_4 = ArcTool:Clone()TOOL_4.Parent = Start print"Gave Building,Arc Tool for a citizen, Level 20" end end script.Parent.Text = "Wait" wait(5) script.Parent.Text = "Check Rank" debounce = false end end
function GiveHighRankTools() if debounce == false then debounce = true if player:IsInGroup(Groupn) then if player:GetRankInGroup(Groupn)>= 80 then--80 and higher include guns with regular tools local GUN_1 = Gun1:Clone() GUN_1.Parent = Backpack local GUN_1B = Gun1:Clone()GUN_1B.Parent = Start local GUN_2 = Gun2:Clone()GUN_2.Parent = Backpack local GUN_2B = Gun2:Clone()GUN_2B.Parent = Start local GUN_3 = Gun3:Clone()GUN_3.Parent = Backpack local GUN_3B = Gun3:Clone()GUN_3B.Parent = Start local TOOL_1 = BuildTool:Clone()TOOL_1.Parent = Backpack local TOOL_2 = BuildTool:Clone()TOOL_2.Parent = Start local TOOL_3 = ArcTool:Clone()TOOL_3.Parent = Backpack local TOOL_4 = ArcTool:Clone()TOOL_4.Parent = Start print"Gave Building,Arc Tool for a Police or Higher, Level 80+" end end script.Parent.Text = "Wait" wait(5) script.Parent.Text = "Check Rank" debounce = false end end
script.Parent.MouseButton1Click:connect(GiveCitizenTools) script.Parent.MouseButton1Click:connect(GiveHighRankTools)
|
|
|
| Report Abuse |
|
|
IRyan70
|
  |
| Joined: 08 Jun 2011 |
| Total Posts: 484 |
|
|
| 30 Jul 2015 11:51 PM |
Bump Someone please help me :) Ive been going at this all day and I cant get it to work 'properly' SAVE ME!!! |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2015 11:53 PM |
| Wheres the code that 'gets' the player's rank? |
|
|
| Report Abuse |
|
|
IRyan70
|
  |
| Joined: 08 Jun 2011 |
| Total Posts: 484 |
|
|
| 30 Jul 2015 11:55 PM |
Just after the function begins, after the debounce statement it is
if player:IsInGroup(Groupn) then if player:GetRankInGroup(Groupn)==20 then |
|
|
| Report Abuse |
|
|
IRyan70
|
  |
| Joined: 08 Jun 2011 |
| Total Posts: 484 |
|
| |
|
IRyan70
|
  |
| Joined: 08 Jun 2011 |
| Total Posts: 484 |
|
|
| 31 Jul 2015 12:02 AM |
Bump Bummer Help me if you can.. Goodnight everyone.. :( |
|
|
| Report Abuse |
|
|
IRyan70
|
  |
| Joined: 08 Jun 2011 |
| Total Posts: 484 |
|
| |
|
IRyan70
|
  |
| Joined: 08 Jun 2011 |
| Total Posts: 484 |
|
| |
|
IRyan70
|
  |
| Joined: 08 Jun 2011 |
| Total Posts: 484 |
|
| |
|
IRyan70
|
  |
| Joined: 08 Jun 2011 |
| Total Posts: 484 |
|
| |
|