math.random printing the same number forever?
What I'm trying to do is when a player joins this game, it will roll a number between 1 and 3, If its 1 gui1 opens, and if its 2 or 3 gui2opens, my problem is the first player to join the game, lets say they get a 2 roll, everyone else gets a 2 role, not a 3 or 1. Even when the odds are raised to 1 and 10 it does the exact same thing. No errors. Besides that, the code works fine.
CODE:
01 | local players = game:GetService( "Players" ) |
03 | local num = math.random( 1 , 10 ) |
07 | players.PlayerAdded:Connect( function (players) |
12 | game.StarterGui.gui 1. Enabled = true |
15 | game.StarterGui.gui 2. Enabled = true |
thanks :)