math.random keeps picking same number?
script:
01 | script.Parent.PrimaryPart = script.Parent.BasePart |
03 | local r = math.random( 1 , 2 ) |
06 | local room = game.ReplicatedStorage.spawnconn 2 :Clone() |
07 | room.Parent = game.Workspace |
08 | room:MoveTo(script.Parent.BasePart.Position) |
10 | local room = game.ReplicatedStorage.spawnconn 1 :Clone() |
11 | room.Parent = game.Workspace |
12 | room:MoveTo(script.Parent.BasePart.Position) |
problem: this script always picks 2 as the number. Every. Single. Time. I've tested it with adding more numbers, like 3, and it seems to always pick the highest number. Example, if it was (1,10), it would always pick 10. If it was (1,4), it would always pick 4. And, in this scripts case, it always picks 2, never 1. Am I missing something? Why won't it pick randomly between the two?
*All help is appreciated! *