JoeMonnieJoin Date: 2011-09-17 Post Count: 407 |
I have a script that I need to be in all the blocks of a plane. The problem is that there is hundreds of blocks in that plane. Is there a way to paste the script into more than one block at a time? |
|
|
copy the script and highlight all the bricks in explorer and paste |
|
|
Yea, that's how virus scripts work. I'm not sure how the exact code would look. |
|
|
and if you don't know how to do that click the brick in explorer press shift then scroll down in explorer to the last brick on the list, click it and paste |
|
JoeMonnieJoin Date: 2011-09-17 Post Count: 407 |
When I select all and hit paste, it only paste's the script once, and not into any blocks. I can't right click and press paste into because the "paste into" is grey (can't click on it). |
|
JoeMonnieJoin Date: 2011-09-17 Post Count: 407 |
Anyone else? |
|
|
im no scripter but could you not just make it a model and put the script in it? why would it have to be in every brick? |
|
JoeMonnieJoin Date: 2011-09-17 Post Count: 407 |
There was a reason...but what you said gave me an idea for another way to do this. Thanks! |
|
|
JoeMonnieJoin Date: 2011-09-17 Post Count: 407 |
There was a reason...but what you said gave me an idea for another way to do this. Thanks! |
|
JoeMonnieJoin Date: 2011-09-17 Post Count: 407 |
oops forget that ^^^^^ |
|
|
You could make it into a model, put the script in the model and use a scripting formation that include cloning the script into all of the Model's children. |
|
drew8732Join Date: 2010-04-01 Post Count: 1965 |
You could run a script to put it in each plane part. Insert a script into the plane's model and copy/paste this into it:
for _,p in pairs(script.Parent:GetChildren()) do
if p.ClassName == "Part" then
s = script.Script:clone()
s.Parent = p
end
end
The way I did this, you must put the script that you want to be put in each of the parts INSIDE this script. Then run it in studio, and hopefully it should work. Otherwise I can make it into a model for you.
|
|
JoeMonnieJoin Date: 2011-09-17 Post Count: 407 |
Thanks dude! It worked! Nice surprise to get on and immediately see exactly what I need :) |
|
JoeMonnieJoin Date: 2011-09-17 Post Count: 407 |
Oops spoke too soon. It didn't do anything.
The script is named "script duplicator".
17:43:49.609 - Touched is not a valid member of Workspace
17:43:49.610 - Script 'Workspace.BreakJoints', Line 1
17:43:49.610 - Stack End
17:43:49.714 - Script is not a valid member of Script
17:43:49.715 - Script 'Workspace.Model.Script Duplicator', Line 3
17:43:49.716 - Stack End
17:43:49.836 - Touched is not a valid member of Workspace
17:43:49.837 - Script 'Workspace.BreakJoints', Line 1
17:43:49.838 - Stack End
17:43:49.954 - Touched is not a valid member of Workspace
17:43:49.955 - Script 'Workspace.BreakJoints', Line 1
17:43:49.955 - Stack End
17:43:49.961 - Touched is not a valid member of Script
17:43:49.962 - Script 'Workspace.BreakJoints.BreakJoints', Line 1
17:43:49.962 - Stack End
17:43:50.052 - Touched is not a valid member of Workspace
17:43:50.052 - Script 'Workspace.BreakJoints', Line 1
17:43:50.053 - Stack End
17:43:50.072 - Touched is not a valid member of Workspace
17:43:50.072 - Script 'Workspace.BreakJoints', Line 1
17:43:50.073 - Stack End
17:43:50.114 - Script is not a valid member of Script
17:43:50.115 - Script 'Workspace.Model.Script Duplicator', Line 3
17:43:50.116 - Stack End
17:43:50.185 - Touched is not a valid member of Workspace
17:43:50.186 - Script 'Workspace.BreakJoints', Line 1
17:43:50.187 - Stack End
17:43:50.218 - Touched is not a valid member of Workspace
17:43:50.219 - Script 'Workspace.BreakJoints', Line 1
17:43:50.220 - Stack End
17:43:50.273 - Touched is not a valid member of Script
17:43:50.274 - Script 'Workspace.Model.Script Duplicator.BreakJoints', Line 1
17:43:50.275 - Stack End
17:43:50.324 - Touched is not a valid member of Script
17:43:50.325 - Script 'Workspace.Model.Script Duplicator.BreakJoints', Line 1
17:43:50.325 - Stack End |
|
drew8732Join Date: 2010-04-01 Post Count: 1965 |
Sorry, it's really confusing to describe where to put everything with the way I did it. Basically, your heirarchy should look like this:
Workspace
>Your Plane Model
>>Script that I gave to you
>>>The script to be duplicated into each part (named "Script")
>>Part
>>Part
>>Part
>>Part
>>Part
>>Part
>>Part
>>Part
>>So on
If I've succeeded in confusing you more, it might just be eaiser if I got your model and did it myself, I'd be glad to. :) |
|
JoeMonnieJoin Date: 2011-09-17 Post Count: 407 |
Oh I didn't realize I was supposed to name my script "Script". I'll go test it out now. |
|