hello scripting helpers! i just wanna know if theres an easier way to pick what map to spawn. thats about it
script.Parent.MouseClick:Connect(function()
print("button pressed")
local Room = math.random(1,2)
if Room == 1 then
local map = game.ReplicatedStorage.TestMaps.Map1:Clone()
print("cloned")
map.Parent = game.Workspace
print("parent changed")
map:MoveTo(script.Parent.Parent.Parent.EndPoint.Position - Vector3.new(0,0,1))
wait(0.1)
end
if Room == 2 then
local map = game.ReplicatedStorage.TestMaps.Map2:Clone()
print("cloned")
map.Parent = game.Workspace
print("parent changed")
map:MoveTo(script.Parent.Parent.Parent.EndPoint.Position - Vector3.new(0,0,1))
wait(0.1)
end
script.Parent.Parent:Destroy()
end)
any help would be nice :)
