THIS IS AN EXAMPLE CODE. THAT’S NOT THE ACTUAL CODE
local TableOfStuff = {
Var1 = workspace:WaitForChild("Part1"),
Var2 = workspace:WaitForChild("Part2"),
Var3 = workspace:WaitForChild("Part3"),
Var4 = workspace:WaitForChild("Part4"),
Var5 = workspace:WaitForChild("Part5")
}
button.MouseButton1Click:Connect(function()
if 1 == 1 then
local randomCahance = math.random(1, #TableOfStuff)
end
end)
Why is #TableOfStuff
underlined red? Doesn’t #
get the length of a table?