Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

What would be worse for a player: 1000 models in ReplicatedStorage or 1000 models in ServerStorage?

So I'm working to optimize my game, and I found a major source of lag. The problem is that I have 1000+ models in ServerStorage that need to appear on the client as a 3D Gui. However, the client cannot access ServerStorage so I did a bit of hack-y work to return the models with a RemoteFunction.

function game.ReplicatedStorage.THREEDModels.OnServerInvoke(plr,model)
	local m = game.ServerStorage.Morphs:FindFirstChild(model):clone()
	m.Parent = game.Lighting.ModelCloningFolder
	game.Debris:AddItem(m,.1)
	return m
end

This gives the client enough time to grab the model before it is removed from lighting. However, it is extremely resource-intensive which is what brings me to my question: How would those 1000+ models affect the players loading time if they were in ReplicatedStorage as opposed to ServerStorage? All help is appreciated. Thanks!

1 answer

✓ Accepted answer

Serverstorage is only on the server making it not affect player's load times. Note that the serverstorage can only be accessed by the server. Replicatedstorage is on both server and client so it will affect the player's load times.

1 comment

0

Use ReplicatedStorage for storage for LocalScript Access, and use almost only ServerScriptService for storage for Server Sided scripts to access. Just an add on. Sporkyz's right though.

This discussion is preserved as it was. New answers, comments, and votes are closed.