I made this round script for a round based game but whenever it finishes the intermission part it says a error "Attempt to call a nil value: Line 11" i dont understand the error so can u please help? Heres the script
local I = 30
local Hint = Instance.new("Hint")
Hint.Parent = game.Workspace
Hint.Name = "Intermission"
while true do wait (1)
I = I - 1
game.Workspace.Intermission.Text = "Intermission: "..I
if I == 0 then
local Round = 1
if Round == 1 then
Round1()
break
end
end
end
function Round1()
for _, v in pairs(game.Players:GetChildren()) do
v:WaitForChild("PlayerGui").ScreenGui.Frame.Visible = true
local msg = "Welcome to the Lobby Event!"
local text = msg
local Texty = v:WaitForChild("PlayerGui").ScreenGui.Frame.TextLabel
for i = 1,#text do
Texty.Text = string.sub(text,1,i)
local cor = coroutine.wrap(function()
local sound = Instance.new("Sound")
sound.Volume = .5
sound.SoundId = "rbxassetid://151715959"
sound.Parent = v:WaitForChild("PlayerGui").ScreenGui
sound:Play()
sound.Ended:Wait()
sound:Destroy()
end)
cor()
wait(0.03)
end
wait (3)
local msg = "In this event you do absolutely nothing :U"
local text = msg
local Texty = v:WaitForChild("PlayerGui").ScreenGui.Frame.TextLabel
for i = 1,#text do
Texty.Text = string.sub(text,1,i)
local cor = coroutine.wrap(function()
local sound = Instance.new("Sound")
sound.Volume = .5
sound.SoundId = "rbxassetid://151715959"
sound.Parent = v:WaitForChild("PlayerGui").ScreenGui
sound:Play()
sound.Ended:Wait()
sound:Destroy()
end)
cor()
wait(0.03)
end
wait (3)
v:WaitForChild("PlayerGui").ScreenGui.Frame.Visible = false
end
end

4 comments
Your trying to do something that doesnt exist. You dont need the parameters after Round1 and change round1 to round.
ok
what does that mean?
?