I tried all that I know. I know what math.random is but I do not know how to make it go to a variable. Here is my attempt
while true do
wait(.1)
MyNum = math.random
if MyNum == 1 then
Well first of all the number range for
math.random
is -infinity to infinity so the chances of you getting 1 in that large amount of numbers are slim to none so what you could do is
while wait(3) do -- every 3 seconds local Var = math.random(-5,5) --setting range to be -5 through 5 if Var == 1 then -- which is 1/11 chances of getting a 1 but you get the point print("Var = "..Var) else print("No") end end