Random map is only cloning folders and models
Im trying to make a randomised map system stored in a folder that has all the maps.
The folder is only cloning folders and models not parts
ive tried many solutions but I haven’t found one
local maps = game.ReplicatedStorage.Maps:GetChildren()
local randommap = Maps[math.random(#Maps)]
local selectedmap = randommap:Clone()
selectedmap.Parent = workspace
this has been going on for a while and I desperately need a fix to this
Well I can’t really say for sure what the problem is, but maybe it’s this typo?
Maybe “Maps” was meant to be “maps” since you declared the variable with a lowercase M and it is instead accessing another variable… or is it just a typo in your forum post?
I just tested it and the only issue with this is the typo. Is there even a variable that is called “Maps” (With the uppercase M)? If not you should be getting an error. What if you tried this exact snippet right here?
local maps = game.ReplicatedStorage.Maps:GetChildren()
local randommap = maps[math.random(#maps)]
local selectedmap = randommap:Clone()
selectedmap.Parent = workspace
Changing the uppercase M into a lowercase m fixed it for me, so I dont see any other issues with this. Unless there is an issue with a part of the script that you didn’t upload.