I am trying to make a math.random script execute when I press a TextButton, how can I do this? I've attempted to make it execute through a function but have had little success. I am very new to Roblox scripting, so I'm probably just doing something wrong.
math.randomseed()
for _ = 1, 10 do
print(math.random(20))
wait(3)
end
For the function, I tried:
function Roll
()for _ = 1, 10 do
print(math.random(20))
wait(3)
end
end
Additionally, what's a way I can I make it show up on a BillboardGui above the player's head?
