Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I keep getting these errors and the UI isn't showing up on my screen. How do I fix this?

Asked by 3 years ago

I am following the AlvinBlox piggy tutorial and I keep getting these errors that says:

ServerScriptService.Game Logic.RoundModule:15: Expected identifier when parsing expression, got '[' - Studio - RoundModule:15

and

Requested module experienced an error while loading - Server - Game Logic:1

Here is my code:

local Round = require(script.RoundModule)

Round.Intermission(10)

local chosenChapter = Round.SelectChapter()-- This is the map currently in the chapters folder

local clonedChapter = chosenChapter:Clone()
clonedChapter.Name = "Map"
clonedChapter.Parent = game.Workspace

and

local module = {}

local status = game.ReplicatedStorage:WaitForChild("Status")

function module.Intermission(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() -- Table of all map models
    local chosenChapter [rand:NextInteger(1,#chapters)]

    return chosenChapter
end

return module

1 answer

Log in to vote
0
Answered by 3 years ago

try re-watching that part, you might of missed something

Ad

Answer this question