Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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

This discussion is preserved as it was. New answers, comments, and votes are closed.