Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What is the most efficient way to create multiple of the same thing?

Asked by 5 years ago

What is the most lag resistant and micro-optimization when creating multiple of the same thing? I assume it would be to copy a pre-made version, but it could also be to loop and use instance.new(). Unless there is another way I am unsure of.

1 answer

Log in to vote
3
Answered by
ben0h555 417 Moderation Voter
5 years ago
Edited 5 years ago

If you mean making a copy of an object, then use Instance:Clone().

But if you mean copying code, use a linked-source or a module-script.

0
I mean an object, is it better to do instance.new and create the object that way. Or copy a premade Stephenthefox 94 — 5y
0
Copy a premade if you want it to be faster, than you dont have to set the values and all the engine has to do is create a copy. ben0h555 417 — 5y
0
Thats what I expected. Stephenthefox 94 — 5y
Ad

Answer this question