I have a problem, I would like to get the play name from a list and put it in a variable (string).
local gameresults = "oneplayeralive"
if #activecontestants == 1 then
partforwinner.CanCollide = true
for _, player in pairs(activecontestants) do
if player then
local playername = player:GetFullName()
event:FireAllClients(gameresults, playername)
end
end
else
gameresults = "nowinner"
end
And to put it in a gui :
event.OnClientEvent:connect(function(...)
local tuple = ...
if tuple == "oneplayeralive" then
resultsannonce.Text = "The winner is"
winnerannonce.Text = tuple[2]
else
resultsannonce.Text = "No winner"
winnerannonce.Visible = false
end
But, when I test, it's send me an error because "tuple[2]" is not a string.
If someone could help me, it's could be great, thanks you.
(sorry for the bad english, i'm french)
