Is there any way of inserting Lua scripts in ROBLOX into multiple bricks at once?

scripts
by Kmeron

Question by Freya: Is there any way of inserting Lua scripts in ROBLOX into multiple bricks at once?
It is so incredibly annoying having to one by one paste a script into each brick that I want the script(s) to go in to. Whenever I highlight multiple bricks and try to paste anything into them all at once, it denies me access to do so.
So here again is my question:
Is there any way of pasting/inserting Lua scripts in ROBLOX studio into several bricks at once?

Best answer:

Answer by Yahoo! XD
sry if i double post but:

1: make a Model in the Workspace called “CloneModel”

2: put the script into the workspace and call it “CloneScript”

3: put all the parts you want with the script into CloneModel

4: Put this in the command bar and press enter:

m = Game.Workspace.CloneModel:GetChildren() for i = 1, #m do Game.Workspace.CloneScript:clone().Parent = m[i] end

5: Put the parts where they’re supposed to be, and delete CloneScript and CloneModel from the workspace.

What do you think? Answer below!

Get the book now