I’m trying to clone a model from replicated storage to workspace and it works, except for the fact that the parts won’t clone. Every other child will clone, just the parts won’t. Even if I clone the parts separately and then try to add them to my cloned model they won’t clone. Archivable is on in all of the parts. This is the first time I’ve had this issue.
Source model:
Cloned Model:
Code: (ServerScript Inside of ServerScriptService)
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game.Players
Players.PlayerAdded:Connect(function(Player)
local NewCharacter = ReplicatedStorage.TestSingle:Clone()
NewCharacter.Owner.Value = Player.Name
NewCharacter.Parent = workspace
local PlayersBot = Instance.new("ObjectValue", Player)
PlayersBot.Name = "Bot"
PlayersBot.Value = NewCharacter
end)
Where are you cloning them to (position) and where do you check the cloned instance (client or server)? Because with streaming enabled, it will appear as if parts that are too far away do not exist in order to make the game less laggy.
Is the Part’s Archiveable property set to false? (If so, that would explain the behavior you’re encountering).
On the other hand: You shouldn’t set the Parent in the Instance.new constructor as specified in the documentation:
Note that when the Parent of an object is set, Luau listens to a variety of different property changes for replication, rendering, and physics. For performance reasons, it’s recommended to set the instance’s Parent property last when creating new objects, instead of specifying the second argument (parent) of this constructor.
It’ll be down to the positioning of the actual model itself - if you move the model to somewhere that is rendered close-by to the player (this can be done whilst it’s still a child of ReplicatedStorage) then when it comes to cloning the model, the parts inside of the model will still be present.
This was achieved using the same code snippet you sent - hope this helps!
When checking for parts in the explorer, you should do so from the server side in case they are not being rendered on the client. You can change the view using a button that says something like “current view: client”.
You can also try to set StreamingEnabled to false in the properties tab of workspace.
I just checked the server, all the parts are there in the server, so it is definitely a problem with the parts being rendered out. So I turned off streamingenabled and this has fixed the problem. Thanks!