Why is random not being random? Okay so this script is in a loop. It does a random outcome, but it just spams the same outcome it chose. For example lets say at the beginning of the game it chose "Outcome 2," now the script loops, so it goes back to the beginning, and it has to chose "Outcome 1-6," but it picks "Outcome 2 again." This repeats on the same server. However if it was a different server it would choose AT THE BEGINNING of the game a random outcome. Lets say this NEW server picks "Outcome 1," when the script loops, it spams that "Outcome 1." Why is this happening? Thanks!
local randomDanger = math.random(1, 2)
local randomSpeed = math.random(1, 3)
while true do
wait(1)
if randomDanger == 1 then
if randomSpeed == 1 then
--Outcome 1
wait(4)
elseif randomSpeed == 2 then
--Outcome 2
wait(4)
elseif randomSpeed == 3 then
--Outcome 3
wait(4)
end
elseif randomDanger == 2 then
if randomSpeed == 1 then
--Outcome 4
wait(4)
elseif randomSpeed == 2 then
--Outcome 5
wait(4)
elseif randomSpeed == 3 then
--Outcome 6
wait(4)
end
end
end

3 comments
Yeah but why does it just spam the same outcome the whole time? If it is a different server it spams another outcome the whole time
I see why.Let me respond why.
I responded with an answer.If it is the answer you were looking for,be sure to mark it as answered!