Currently im creating a template that recreates a moving model on client which has a lot of details that use welds, i have made a script that creates a folder with weld-info (such as object & CFrame values for C0/Part0 etc) of the model on server so that the client can recreate those welds, but sometimes (1/100 change this happens) the welds do not load in correctly, causing some details of the model to break. i made the client script yield on line 1 until all content is loaded in before creating the welds. any advice?
Ok so, this is for all other people who had issues with broken models on client:
I fixed the system and also now know that some welds take longer to load in. using clone()
on a still-loading model is NOT recommended of-course. this loading process may take even longer when it comes to welded meshparts, but that is just a theory.
The model I took as example existed out of close to 615
instances.
Here is where the service ContentProvider
comes in (see How to properly use ContentProvider:PreloadAsync()? ). By making a dummy clone of the desired model and yielding it until it fully loaded using the content service, you may prevent having any broken welds or models in your game or ModuleScripts
.