local module = {}
local status = game.ReplicatedStorage:WaitForChild("Status")
function module.Intermision(length)
for i = length,0,-1 do
status.Value = "Next round starts in "..i.." seconds"
wait(1)
end
end
function module.SelectChapter()
local rand = Random.new()
local chapters game.ReplicatedStorage.Chapters:GetChildren()
local chosenChapter = chapters[rand:NextInteger(1,#chapters)]
return chosenChapter
end
return module
COMMUNITY QUESTION
Game Logic.RoundModule:15: attempt to get length of a nil value?
1 answer
You're missing a = at line 14.
local module = {}
local status = game.ReplicatedStorage:WaitForChild("Status")
function module.Intermision(length)
for i = length,0,-1 do
status.Value = "Next round starts in "..i.." seconds"
wait(1)
end
end
function module.SelectChapter()
local rand = Random.new()
local chapters = game.ReplicatedStorage.Chapters:GetChildren() -- Right here, make sure there's an equal sign.
local chosenChapter = chapters[rand:NextInteger(1,#chapters)]
return chosenChapter
end
return module
Make sure to carefully review your code. Hope this helps!
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
you never set the variable chapters