Hello TOP_Crundee123,
I would like to give an explanation of why instancing would be best optimise wise in the following statements.
If you are to use cloning this requires deplucation of a model, if this is a large model it will use a lot of memory to run this process, whilst with instancing even though It may take longer to program, it uses less memory to create a duplicate as it is creating the model from scratch via script.
Instancing can also be helpful as if you define the variable you can always use it again to define lets say a Touched event.
May I remind you, you can add a wait onto your script which will help low-end players from lagging out.
If the server is doing it, I’d put it all in ServerStorage and clone.
If the client is doing it, then depending on how much stuff you have I’d be wary of putting it all in ReplicatedStorage as you don’t know the memory limit of each client you’re ever gonna get.
How often is this occurring? Would you clone once and that’s it for the game? Or is this linked to movement? Or is it based on a fixed time step?
You can’t ask a question about lag without this info.
There are too many parameters that need to be filled in my opinion. Server or client? When are said objects supposed to be instanced/cloned? Under what conditions and etc. Personally, for UI I’d instance but if it is a building, I’d clone them. Although this is just a preference and my ignorance towards optimisation and performance hehe.