You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
a list with all the players -
What is the issue? Include screenshots / videos if possible!
i dont see any 1 -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
no
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
-- local script
local Add = function(player)
wait(2)
local scr = script.Parent
for i,v in ipairs(scr:GetChildren()) do
if v:IsA("TextButton") then
v:Destroy()
end
end
wait()
for i,v in ipairs(game.Players:GetPlayers()) do
print('hello '..player.Name)
local TextButton = Instance.new("TextButton")
local Name = v.Name
local disP = v.DisplayName
TextButton.Name = Name
TextButton.Text = disP..',['..Name..']'
TextButton.Size = UDim2.new(0.95, 0,0.1, 0)
TextButton.Parent = scr
end
end
game.Players.PlayerAdded:Connect(Add)
game.Players.PlayerRemoving:Connect(Add)