HellO! so I’m making a Boss for my game, Its just a Dummy, But still very epic!!!
So, I made a table for the Boss’s attacks, The issue is I have no idea how Im supposed to return the math.random and find out what it got, I’m doing this so that when we do figure out, I can make the Boss do the attack
Here’s the script rn
local AttackList = {"Stomp", "Punch", "Drill"}
while true do
wait(5)
math.random(AttackList[math.random(1, #AttackList)])
end
First, you should turn the attack into a variable if you ever want to print the attack or do whatever with it.
Second, remove the first math.random because you are already randomly indexing a key in the table using (pseudorandom number generator), inside the square brackets.
local attack = AttackList[math.random(1, #AttackList)]