|
| 31 Dec 2013 01:45 AM |
function UnpackModel(m,parent) for i,v in ipairs(m:GetChildren()) do repeat wait() if parent:findFirstChild(v.Name) then parent[v.Name]:Destroy() end until not parent:findFirstChild(v.Name) v.Parent = parent end end local assetId = 138295801 local assetObj local assetName = script.Name:gsub("_AutoUpdater","") if game.Lighting:findFirstChild(assetName) then assetObj = game.Lighting[assetName]:clone() else assetObj = game:GetService("InsertService"):LoadAsset(assetId):GetChildren()[1] end
if assetObj then for i,v in ipairs(assetObj:GetChildren()) do if game:findFirstChild(v.Name) then UnpackModel(v,game[v.Name]) else local parent = script.Parent repeat wait() if parent:findFirstChild(v.Name) then parent[v.Name]:Destroy() end until not parent:findFirstChild(v.Name) v.Parent = parent end end end |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 01:48 AM |
| I'm basically making a mirror. |
|
|
| Report Abuse |
|
|
Avner
|
  |
| Joined: 30 Nov 2007 |
| Total Posts: 3390 |
|
| |
|
OxyNoob
|
  |
| Joined: 29 Dec 2013 |
| Total Posts: 136 |
|
|
| 31 Dec 2013 02:04 AM |
| If you don't know how to script don't bother lol |
|
|
| Report Abuse |
|
|
bloxxyz
|
  |
| Joined: 15 Apr 2012 |
| Total Posts: 6995 |
|
|
| 31 Dec 2013 02:05 AM |
Try putting it in the brick, test, take it out of the brick, test.
Laziness is not effort. |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 02:06 AM |
| Just put the script into the brick then put the code into the script der |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 02:07 AM |
| I did all of that, im not lazy.. |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 02:09 AM |
Copy and Paste.
Indian of ATR |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 02:12 AM |
| @Dan What does that even mean if im copy and pasting it into the brick? |
|
|
| Report Abuse |
|
|
OxyNoob
|
  |
| Joined: 29 Dec 2013 |
| Total Posts: 136 |
|
|
| 31 Dec 2013 02:15 AM |
Okay that script just cant be run like 'poof'
It requires you to have a lot of materials. Look through the script and see what you need and where to put it. If you don't know how, its too advanced and what do you expect to do with a mirror if you cant script. |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 02:16 AM |
Just go to basic tools, and click script. Add the script into "script" in workspace, and then close the script. Cut the script, and paste it into the brick you wanted to add it into. And this should be in the proper forum.
|
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 31 Dec 2013 02:54 AM |
If you can't figure out where to put it, you didn't make it.
Use a free model. |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 03:08 AM |
| I didn't make it! The best game creator did. He made it free and i want to test it, its a mirror script. |
|
|
| Report Abuse |
|
|
sk8t3r230
|
  |
| Joined: 13 Jun 2011 |
| Total Posts: 8649 |
|
|
| 31 Dec 2013 03:10 AM |
I'll try to make the model for you
When I die, I want to die like my grandfather - peacefully asleep - and not screaming like the passengers in his car . . . |
|
|
| Report Abuse |
|
|
sk8t3r230
|
  |
| Joined: 13 Jun 2011 |
| Total Posts: 8649 |
|
|
| 31 Dec 2013 03:24 AM |
Try this out: local x, y, z, r00, r01, r02, r10, r11, r12, r20, r21, r22 = mirPart.CFrame:toObjectSpace(original.CFrame):components(); mirrored.CFrame = mirPart.CFrame:toWorldSpace(CFrame.new( -x, y, z, r00, -r01, -r02, -r10, r11, r12, -r20, r21, r22 )) ; if (mirrored.ClassName == "CornerWedgePart") then mirrored.Size = Vector3.new(original.Size.z, original.Size.y, original.Size.x); mirrored.CFrame = mirrored.CFrame * CFrame.Angles(0, pi / 2, 0); end
When I die, I want to die like my grandfather - peacefully asleep - and not screaming like the passengers in his car . . . |
|
|
| Report Abuse |
|
|
| |
|
|
| 31 Dec 2013 03:31 AM |
| sk8, can you make the mirror as a model? If you want to know more about the thing i want to edit for real is The Mirror Game, Search it up. It's really fun. |
|
|
| Report Abuse |
|
|
sk8t3r230
|
  |
| Joined: 13 Jun 2011 |
| Total Posts: 8649 |
|
|
| 31 Dec 2013 03:48 AM |
I'm trying to make it, but it's not working.
Try thing one:
local tinsert = table.insert; local tremove = table.remove; local objs = { }; local ref = workspace.Reflected; local mirPart = workspace.MirrorPart; do local function makeNew(p) if (p.Parent == ref) then return end if ((p:IsA("BasePart")) and (not p:IsA("Terrain"))) then local c = p:Clone(); if (not c) then return; end c.Anchored = true; c.Parent = ref; objs[p] = c; end end local function makeAll(m)
for _, p in pairs(m:GetChildren()) do if (p:IsA("BasePart")) then makeNew(p); elseif (p:IsA("Model")) then makeAll(p); end end end makeAll(workspace); workspace.DescendantAdded:connect(makeNew); workspace.DescendantRemoving:connect(function (p) if (p:IsA("BasePart")) then if (objs[p]) then objs[p]:Destroy(); objs[p] = nil; end end end); end while (true) do wait(0.1); for original, mirrored in pairs(objs) do local cf = original.CFrame; local p = cf.p; local lv = cf.lookVector; local mirP = p * Vector3.new(-1, 1, 1); mirrored.CFrame = CFrame.new(mirP, mirP + (lv * Vector3.new(-1, 1, 1))); end end
When I die, I want to die like my grandfather - peacefully asleep - and not screaming like the passengers in his car . . . |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 03:49 AM |
| The part im making into a mirror is called "Part" |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 03:50 AM |
How to make a mirror: 1. Get a block, resize to how you like. 2. Go into properties, and set reflection to 1. |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 03:54 AM |
| Well, still not working but great effort and good night. |
|
|
| Report Abuse |
|
|