Hello! I am trying to develop a FPS mini game using ROBLOX’s new laser tag template. I have two custom maps created and such but I am stuck on this part of the script. The plan is to have it call a Modes module script that will load the map and round data. However, no matter how I rewrite it, I cant get it to call anything other than the TDM module. Taking out TDM from local MODES = { only leaves an error and renaming both to TDM, only loads the first TDM module. The selected script in the image is what the segment of script below is from.
This is my first time working with module scripts and it’s pretty hectic to my basic scripting knowledge. But I want to figure these out and I need some help lol.
local remotes = ReplicatedStorage.Gameplay.Remotes
local roundWinnerRemote = remotes.RoundWinner
local MODES = {
require(script.Parent.Modes.TDM),
}
local random = Random.new()
local function startRoundLoopAsync()
while true do
-- Reset scores
Scoring.resetScores()
-- Pick mode
local mode = MODES[random:NextInteger(1, #MODES)]
local timer = mode.timer
workspace["Bad Manners OL"]:Stop()
-- Start the mode, passing in a callback to be called if it finishes early
local roundFinished = false
mode.start(function()
roundFinished = true
end)
-- Spawn characters
Players.CharacterAutoLoads = true
spawnCharacters()