I’m trying to announce the winner of the round to all players on the server but for some reason, I can’t get the formatting right in this line (I think)
winnerAnnouncement.Text = ("The winner is", name)
full code:
local canCollect = true
local winnerAnnouncement = game.StarterGui.ScreenGui.WinnerAnnoucement
while canCollect == true do
wait(0.5)
if #list <= 1 then
canCollect = false
print("The winner is...", list)
print(list)
local player = game:GetService("Players"):GetPlayerFromCharacter(counted_clone.Parent)
player:WaitForChild("leaderstats").Points.Value = player:WaitForChild("leaderstats").Points.Value + 50
local name = player.Name
winnerAnnouncement.Text = ("The winner is", name)
winnerAnnouncement.Visible = true
end
end
end
end)