Localscript:
wait(1)
local frame = script.Parent.Parent
local disastertext = frame.disaster
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local disaster = ReplicatedStorage.Remotes.returnPlayer
disaster.OnClientEvent:Connect(function(s)
disastertext.Text = table.concat(s, ',')
print(s)
frame.Visible = true
wait(5)
frame.Visible = false
end)
Script that grabs each player and puts them in an array:
function getPlayers()
for _,v in ipairs(game.Players:GetPlayers()) do
table.insert(Array,v);
print(Array)
end
end
I need to be able to get each players name and concat the table. Do I need to create another array that only contains the name of the player or do i need to completely rewrite how I am putting the players into the array?
