I'm making a script that chooses a random Player and makes them DJ, But It won't work! Can someone please help?
local Set = game.Workspace["DJ Set"]
local DJName = Set.CurrentDJ
local Teleport = Set.Teleport
local Players = game.Players:GetPlayers()
DJName.Value = "Choosing New DJ"
while true do
wait(15)
local DJ = math.random(1,#Players)
DJName.Value = DJ.Name
DJ:MoveTo(Teleport.Position + 0,3,0)
wait(160)
DJName.Value = "Choosing New DJ"
end
Here's the Output.
06:24:30.872 - ServerScriptService.DJChooser:11: bad argument #2 to 'random' (interval is empty)
06:24:30.875 - Script 'ServerScriptService.DJChooser', Line 10 |