anyone got any easier way to do pick what map to spawn?
hello scripting helpers! i just wanna know if theres an easier way to pick what map to spawn. thats about it
01 | script.Parent.MouseClick:Connect( function () |
02 | print ( "button pressed" ) |
03 | local Room = math.random( 1 , 2 ) |
05 | local map = game.ReplicatedStorage.TestMaps.Map 1 :Clone() |
07 | map.Parent = game.Workspace |
08 | print ( "parent changed" ) |
09 | map:MoveTo(script.Parent.Parent.Parent.EndPoint.Position - Vector 3. new( 0 , 0 , 1 )) |
13 | local map = game.ReplicatedStorage.TestMaps.Map 2 :Clone() |
15 | map.Parent = game.Workspace |
16 | print ( "parent changed" ) |
17 | map:MoveTo(script.Parent.Parent.Parent.EndPoint.Position - Vector 3. new( 0 , 0 , 1 )) |
20 | script.Parent.Parent:Destroy() |
any help would be nice :)