hi, i need a help with this already working script. it choses the map based on a value inside replicated storage, and it must be like this, but i wonder if there is a quicker way to maker it work instead of inserting every map name
thank you
if mostvoted.Value == "Aquarium" then
chosenChapter= game.ReplicatedStorage.Chapters.Aquarium
elseif mostvoted.Value == "Farm" then
chosenChapter= game.ReplicatedStorage.Chapters.Farm
elseif mostvoted.Value == "Mall" then
chosenChapter= game.ReplicatedStorage.Chapters.Mall
elseif mostvoted.Value == "School" then
chosenChapter= game.ReplicatedStorage.Chapters.School
elseif mostvoted.Value == "Desert" then
chosenChapter= game.ReplicatedStorage.Chapters.Desert
elseif mostvoted.Value == "Nebula" then
chosenChapter= game.ReplicatedStorage.Chapters.Nebula
elseif mostvoted.Value == "Crossroads" then
chosenChapter= game.ReplicatedStorage.Chapters.Crossroads
elseif mostvoted.Value == "Cottage" then
chosenChapter= game.ReplicatedStorage.Chapters.Cottage
elseif mostvoted.Value == "CandyLand" then
chosenChapter= game.ReplicatedStorage.Chapters.CandyLand
elseif mostvoted.Value == "Canyon" then
chosenChapter= game.ReplicatedStorage.Chapters.Canyon
elseif mostvoted.Value == "Hills" then
chosenChapter= game.ReplicatedStorage.Chapters.Hills
end