My error is this: ServerScriptService.Game Logic.RoundModule:24: attempt to get length of a nil value Here my script :
local module = {} local status = game.ReplicatedStorage:WaitForChild("Status") function module.Intermission(length) for i = length,0,-1 do status.Value = "Nex 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 function module.ChooseGreenBall(players) local RandomObj = Random.new() local chosenGreenBall = players[RandomObj:NextInteger(1,#players)] return chosenGreenBall end function module.DressGreenBall(greenball) local character = game.ServerStorage.GreenHead:Clone() character.Name = greenball.Name greenball.Character = character character.Parent = workspace end return module
You can use math.random Instead of Random.new
function module.ChooseGreenBall(players) local MathRandom = math.random() local chosenGreenBall = players[MathRandom(1,#players)] return chosenGreenBall end