|
| 08 Feb 2015 07:06 AM |
there's 4 players but when the functions are called, there's 4 labels but they only show my name
local tab = {}
createlist = function() local orgf = Instance.new("Frame",script.Parent) local gap = orgf.Size.Y.Scale orgf.Position = UDim2.new(0, 0, 0 - script.Parent.TextLabel.Position.Y.Scale/10 + gap, 0) local cur = 0 for i = 1, #tab do cur = cur + 1 gap = gap + 0.05 local f = Instance.new("TextLabel",script.Parent) f.Size = UDim2.new(0.7, 0, 0.05, 0) f.Position = orgf.Position + UDim2.new(0,0, orgf.Position.Y.Scale + gap, 0) f.BorderSizePixel = 0 f.BackgroundColor3 = Color3.new(2/255,4/255,5/255) f.BackgroundTransparency = 0.7 f.Name = tab[cur] f.FontSize = "Size12" f.Font = "Legacy" f.TextXAlignment = "Left" f.Text = tab[cur] end orgf:Destroy() end
_G.firstcheck = function() wait(2) for _, v in pairs(game.Players:GetPlayers()) do local vgui = v.PlayerGui if vgui.Alive.Value == true then table.insert(tab, 1, v.Name) print(tab) createlist() end end end
_G.cleanlist = function() for _, cleanl in pairs(script.Parent:GetChildren()) do for _, cleantab in pairs(tab) do table.remove(tab, 1) print(unpack(tab)) end if cleanl.Name ~= "TextLabel" and cleanl:IsA("TextLabel") then cleanl:Destroy() end end end
_G.plrdied = function(whodied) local label = script.Parent:FindFirstChild(whodied) if label then label.BackgroundColor3 = Color3.new(255,0,0) local ltext = label.Text label.Text = ltext.." =DEAD=" end end
|
|
|
| Report Abuse |
|
| |
| |
| |