leaveButtonEvent.OnServerEvent:Connect(function(plr)
if plr.Character then
for i = 1, #queue do
if queue[i] == plr.Character.Name then
if queue[i] == plr.Character.Name then
if queue[i + 1] then
controlScreenEvent:FireClient(queue[i + 1])
end
end
if queue[1] == plr.Character.Name then
level.Text = "--------------------"
end
table.remove(queue, i)
plr.Character.HumanoidRootPart.Position = Vector3.new(104.853, 5, -7)
local tube = plr.Tube
tube.Value = 0
updatePlayerCount()
end
end
end
end)
It doesn’t let me run controlScreenEvent:FireClient(queue[i + 1])