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)

4 comments

0

Im not sure if thats a thing honestly,

0

It seems like poo, size and explode are nil in your table, that's why using # on it returns 0.

0

Ah you're right yes yes

0

and that's happening because you're putting them in the table before assigning them, try making the function then putting it