This script is supposed to check if someone is in the game or not.
while true do
for i = timeLeft, 1, -1 do
visibleFrame.Value = true
game:GetService("RunService").Heartbeat:Wait()
local timeLeft = config.RoundTime - math.round((tick() - gameStart))
local mins = math.floor(timeLeft / 60)
local secs = timeLeft - (mins * 60)
if string.len(secs) < 2 then
secs = "0" .. tostring(secs)
end
timer.Value = mins .. ":" .. secs
pcall(function()
for i = #playerstable, 1, -1 do
if playerstable[1].Character then
if playerstable[i].Character:FindFirstChild("ConfirmerPlaying") then
else
table.remove(playerstable, i)
end
else
table.remove(playerstable, i)
end
end
end)
task.wait(1)
end
wait()
if #playerstable == 1 then
intermission.Value = "Winner is: "..playerstable[1].Name
wait(7)
pcall(function()
playerstable[1].Character.HumanoidRootPart.Position = game.Workspace.Lobby.SpawnPoint.Position
end)
break
end
if #playerstable == 0 then
intermission.Value = "No winners "
wait(3)
break
end
end
if #playerstable == 1 then
intermission.Value = "Winner is: "..playerstable[1].Name
wait(7)
pcall(function()
playerstable[1].Character.HumanoidRootPart.Position = game.Workspace.Lobby.SpawnPoint.Position
end)
break
end
What is intermission? Is it a NumberValue, an IntValue, or text? It looks like it’s trying to get a number Value and you are assigning a text format.
intermission.Value = "Winner is: "..playerstable[1].Name
you haven’t the variable “intermission” created.
it might be the problem of giving string: "Winner is: " and then you give a number.
you might create two variables one for the number other for the phrase
To understand what error there is in your code, do print("intermission.Value = "Winner is: “…playerstable[1]”) and see what it outputs. Maybe you do not need to write .Name