ServerScript
local gamemodeNames = {"Deathmatch"}
local replicatedStorage = game:GetService("ReplicatedStorage")
local serverScriptService = game:GetService("ServerScriptService")
local gamemodesFolder = serverScriptService:WaitForChild("GamemodesFolder")
local deathmatchRound = require(gamemodesFolder:WaitForChild("Deathmatch"))
local gamemodes = {deathmatchRound}
local randomSlot = math.random(1, #gamemodes)
local randomGamemode = gamemodes[randomSlot]
gamemode = gamemodeNames[randomSlot]
wait(gamemode)
ModuleScript
function deathmatch(localTimer)
localTimer = 100
end
return deathmatch
I'm trying to get the ServerScript to wait a set time, and the set time is set in the module script. I can't just go wait(100) in the main script, cause I plan on having multiple game modes with different times. With what I have now, it just prints a table.
I'm not sure if I need to change what the wait is, or something in the module script to return the number. Please help.
