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

3 comments
Also the script is broken i am new here
Please format all of the script in lua formatting.
There is not enough information to solve this problem since the script calling the function is not defined. Your function is perfectly fine, but the parameter, players is not.