So I have some round loop and in the round loop there is this code:
local lobbyMusic = game.Workspace.lobbyMusic["rblxLobbyMusic"..math.random(1,7)]
game.Workspace.soundEffects.ohioScream.SoundId = "rbxassetid://9399994950"
lobbyMusic:Play()
lobbyMusic.TimePosition = math.random(1,(lobbyMusic.TimeLength - 30))
however, the last line errors rarely, I have only encountered it once but I looked at my cached internal server errors in my servers and fount that the last line errors very rarely. This is the error:
“ServerScriptService.roundScript:927: invalid argument #2 to ‘random’ (interval is empty)”
I don’t know why sometimes this property time length property , because if the lobbyMusic instance does not exist, then the other code before it wont work.