I have tried:
changing to code to a for count = 1, #player instead but it still gave the same output.
in a Local Script in StarterGui
local Players = game.Players
local playerBtn = script.PlayerFrame
script.Parent.Changed:Connect(function()
if script.Parent.Enabled then
for _, player in pairs(Players:GetChildren()) do
local playerBtnClone = playerBtn:Clone()
playerBtnClone.Parent = script.Parent.MainFrame.InnerFrame
playerBtnClone.D3Frame.PlayerButton.Text = player.Name
end
end
end)
local Players = game:GetService("Players")
local PlayerFrame = script:WaitForChild("PlayerFrame")
local lastVote = tick()
local PlayersInList = {}
script.Parent.Changed:Connect(function()
if tick() - lastVote > 15 then
PlayersInList = {}
end
lastVote = tick()
if script.Parent.Enabled then
for i,v in pairs(Players:GetPlayers()) do
if table.find(PlayersInList, v) then
return
end
local playerBtnClone = PlayerFrame:Clone()
playerBtnClone.Parent = script.Parent.MainFrame.InnerFrame
playerBtnClone:WaitForChild("D3Frame").PlayerButton.Text = v.Name
table.insert(PlayersInList, #PlayersInList+1, v)
end
end
end)