local inputservice = game:GetService("UserInputService")
local rep = game:GetService('ReplicatedStorage')
local plr = game.Players.LocalPlayer
local tables = {
poo,
size,
explode
}
local important = tables[math.random(1, #tables)]
function poo()
rep.PooEvent:FireServer()
end
function size()
rep.SizeEvent:FireServer()
end
function explode()
rep.ExplodeEvent:FireServer()
end
inputservice.InputBegan:connect(function(input)
if input.KeyCode == Enum.KeyCode.E then
important()
end
end)
COMMUNITY QUESTION
bad argument #2 to 'random' (interval is empty)??
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
Im not sure if thats a thing honestly,
It seems like poo, size and explode are nil in your table, that's why using # on it returns 0.
Ah you're right yes yes
and that's happening because you're putting them in the table before assigning them, try making the function then putting it