Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

The script won't print who was chosen?

local roundtime = 6 * 60

local funct = game:GetService("ReplicatedStorage"):FindFirstChild("Functions")

local Players = game:GetService("Players"):GetChildren()
--[CopSelection]--

funct.isaCop.OnServerInvoke = function(player)
	for i = 1, 2 do --Choose 2 players
		CopsChosen = math.random(#Players)
		print(CopsChosen)
		wait(roundtime)
		table.remove(Players, CopsChosen) 
	end
end

Help please?

1 answer

 CopsChosen = math.random(2,#Players.Name)
        print(CopsChosen)

Also what table are you removing, I can't seem to find one. If there is no table then get rid of the line table.remove(Players,CopsChosen).

1 comment

0

it didn't work.:/

This discussion is preserved as it was. New answers, comments, and votes are closed.