generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Roblox » All Things ROBLOX
Home Search
 

Re: I'm trying to figure out if i put this script in the brick.

Previous Thread :: Next Thread 
nasserfreak is not online. nasserfreak
Joined: 29 Dec 2012
Total Posts: 663
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
nasserfreak is not online. nasserfreak
Joined: 29 Dec 2012
Total Posts: 663
31 Dec 2013 01:48 AM
I'm basically making a mirror.
Report Abuse
Avner is not online. Avner
Joined: 30 Nov 2007
Total Posts: 3390
31 Dec 2013 01:48 AM
Scripting helpers
Report Abuse
OxyNoob is not online. 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 is not online. 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
vikram12344321 is not online. vikram12344321
Joined: 04 Nov 2011
Total Posts: 2908
31 Dec 2013 02:06 AM
Just put the script into the brick then put the code into the script der
Report Abuse
nasserfreak is not online. nasserfreak
Joined: 29 Dec 2012
Total Posts: 663
31 Dec 2013 02:07 AM
I did all of that, im not lazy..
Report Abuse
DanBossStar321 is not online. DanBossStar321
Joined: 26 Dec 2012
Total Posts: 27652
31 Dec 2013 02:09 AM
Copy and Paste.

Indian of ATR
Report Abuse
nasserfreak is not online. nasserfreak
Joined: 29 Dec 2012
Total Posts: 663
31 Dec 2013 02:12 AM
@Dan What does that even mean if im copy and pasting it into the brick?
Report Abuse
OxyNoob is not online. 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
TakeDown14 is not online. TakeDown14
Joined: 07 Apr 2012
Total Posts: 4122
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
SyndicateHalo is not online. SyndicateHalo
Joined: 23 Mar 2013
Total Posts: 2948
31 Dec 2013 02:24 AM
[ Content Deleted ]
Report Abuse
CinderDude2 is not online. CinderDude2
Joined: 15 Mar 2008
Total Posts: 1916
31 Dec 2013 02:51 AM
this makes no sense
Report Abuse
OneMegabyte is not online. OneMegabyte
Joined: 16 Jan 2013
Total Posts: 1951
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
nasserfreak is not online. nasserfreak
Joined: 29 Dec 2012
Total Posts: 663
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 is not online. 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 is not online. 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
nasserfreak is not online. nasserfreak
Joined: 29 Dec 2012
Total Posts: 663
31 Dec 2013 03:26 AM
u wot m8?
Report Abuse
nasserfreak is not online. nasserfreak
Joined: 29 Dec 2012
Total Posts: 663
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 is not online. 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
nasserfreak is not online. nasserfreak
Joined: 29 Dec 2012
Total Posts: 663
31 Dec 2013 03:49 AM
The part im making into a mirror is called "Part"
Report Abuse
IWantAWord is not online. IWantAWord
Joined: 26 Oct 2013
Total Posts: 2008
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
nasserfreak is not online. nasserfreak
Joined: 29 Dec 2012
Total Posts: 663
31 Dec 2013 03:54 AM
Well, still not working but great effort and good night.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Roblox » All Things ROBLOX
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image