ok, I recently followed a tutorial to make a script, i won’t lie. but how would i convert this to play music if a certain map name is chosen?
the two maps are Crossroads and Desert, and i was thinking of something like
if currentmap.Name = Crossroads then
music:Play()
end
but i’m not sure if that would work. so could i get some advice/help?
local mapfolder = game.Lighting.Maps
local maps = mapfolder:GetChildren()
local roundtime = script.RoundTime
while true do
print ("loop starting")
local chosenmap = maps[math.random(1,#maps)]
local currentmap = chosenmap:Clone()
currentmap.Parent = game.Workspace
currentmap:MakeJoints()
print (chosenmap.Name)
print ("was chosen!")
print("now initating a wait till next round")
wait(20)
print("map destroyed, restarting loop")
currentmap:Destroy()
end