I'm trying to pick a map but it keeps picking the same map (I have 1 model that contains 2 maps in replicated storage)
local RS = game:GetService('ReplicatedStorage') --Same thing as saying (game.Lighting) local Maps = RS.Maps:GetChildren() local PickMap = math.random(1,#Maps) local SelectedMap = Maps[PickMap]:Clone() print(SelectedMap.Name) SelectedMap.Parent = workspace
This most likely isn't a bug but is caused by you not changing the seed of the random generator, at the beginning of your script write, math.randomseed(os.time)
. That makes it so that it uses a different seed each time it generates.