-
What do you want to achieve? A promotion GUI for a security group I’m developing for.
-
What is the issue? When I click the Update List button it will not update the list.
-
What solutions have you tried so far? I have tried cloning the GUI, recreating it. But nothing will work.
Here is my code
-- Group & Ranks
local GID = 7482300
local Rank1 = 2
local Rank2 = 3
local Rank3 = 4
local Rank4 = 5
local Rank5 = 6
local Rank6 = 7
local Rank7 = 8
-- Point Requirements
local Rank1Req = 15
local Rank2Req = 30
local Rank3Req = 45
local Rank4Req = 80
local Rank5Req = 120
local Rank6Req = 170
local Rank7Req = 230
local debounce = false
script.Parent.MouseButton1Click:Connect(function()
if debounce == false then
debounce = true
print(debounce)
for i,v in pairs(script.Parent.Parent.List:GetChildren()) do
if v:IsA("Frame") then
v:Destroy()
end
wait()
end
wait(1)
for number,player in pairs(game.Players:GetPlayers()) do
if player:IsInGroup(GID) then
if player.leaderstats.Credits.Value <= 15 then
if player:GetRankInGroup(GID) <= 1 and player:GetRankInGroup(GID) >= 7 then
local clone = Instance.new("Frame",script.Parent.Parent.List)
clone.Size = script.Gui.Size
local TL1 = Instance.new("TextLabel",clone)
TL1.Size = script.Gui.Name.Size
TL1.Position = script.Gui.Name.Position
TL1.Name = script.Gui.Name.Name
local TL2 = Instance.new("TextLabel",clone)
TL2.Size = script.Gui.CR.Size
TL2.Position = script.CR.Name.Position
TL2.Name = script.Gui.CR.Name
local TL3 = Instance.new("TextLabel",clone)
TL3.Size = script.Gui.NR.Size
TL3.Position = script.NR.Name.Position
TL3.Name = script.Gui.NR.Name
local TL4 = Instance.new("TextLabel",clone)
TL4.Size = script.Gui[">"].Size
TL4.Position = script.Gui[">"].Position
TL4.Name = script.Gui[">"].Name
local name = player.Name
clone.Visible = true
clone.Name = number"-"..name
clone.Name.Text = name
clone.CR.Text = player:GetRoleInGroup(GID)
if player.leaderstats.Credits.Value <= Rank1Req and player.leaderstats.Credits.Value >= Rank2Req then
clone.NR.Text = "[LR]Trained Hawkins"
else
if player.leaderstats.Credits.Value <= Rank2Req and player.leaderstats.Credits.Value >= Rank3Req then
clone.NR.Text = "[LR]Hawkins Elite Security"
else
if player.leaderstats.Credits.Value <= Rank1Req and player.leaderstats.Credits.Value >= Rank4Req then
clone.NR.Text = "[MR]Hawkins Tier 1"
else
if player.leaderstats.Credits.Value <= Rank1Req and player.leaderstats.Credits.Value >= Rank5Req then
clone.NR.Text = "[MR]Hawkins Tier 2"
else
if player.leaderstats.Credits.Value <= Rank1Req and player.leaderstats.Credits.Value >= Rank6Req then
clone.NR.Text = "[MR]Hawkins Tier 3"
else
if player.leaderstats.Credits.Value <= Rank1Req and player.leaderstats.Credits.Value >= Rank7Req then
clone.NR.Text = "[MR]Hawkins Tier 4"
else
if player.leaderstats.Credits.Value <= Rank7Req then
clone.NR.Text = "[MR]Hawkins Elite"
end
end
end
end
end
end
end
end
end
end
end
wait(2.5)
debounce = false
print(debounce)
end
end)
I just want to know why it wont work and would prefer to not be given a whole script.