|
| 01 Mar 2015 10:23 AM |
Just doing some testing, one part will open a map, other will close it. However, it won't clone the map from Lighting, it just moves it to Workspace. Here's what I have...
--Open Map
m = game.Lighting.Map1 p = game.Workspace.PartTest
p.Touched:connect(function() m:Clone() m.Parent = game.Workspace m.Position = -51.158, 0.2, -49.996 end)
_______________________________________
--Close Map
m = game.Lighting.Map1 p1 = game.Workspace.PartTest1
p1.Touched:connect(function() if m.Parent == game.Workspace then m:Destroy() wait(0.03) return m.Parent == game.Lighting end end) |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2015 10:24 AM |
| You need to store the clone of m in a variable. The clone's parent will be nil by default, and then you set it. |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2015 10:34 AM |
So something like...
mclone = game.Workspace.Map1
Because, once it's cloned, it's moved to Workspace which then makes that a valid variable..? |
|
|
| Report Abuse |
|
|
| |
|
| |
|