So, hopefully the title explains it all.
I'm using the "InsertService" a lot in my game, because i'm inserting a lot of models from my profile. This makes the game lagg a bit. Here's an example:
local sword = game:GetService("InsertService"):LoadAsset(0000000000) local bow = game:GetService("InsertService"):LoadAsset(0000000001)
and so on...
i'm not only loading tools but entire models too:
local merchant = game:GetService("InsertService"):LoadAsset(0000000002)
and so on...
Then when i want to spawn one of these things i simply :clone() them and set game.Workspace as Parent. For example: mysword = sword:clone() mysword.Parent = game.Workspace
instead of using ":LoadAsset" each time i spawn something, i would like to preload everything at the beginning. This would avoid a lot of lagg.
Robloxwiki only shows how to preload sounds. Here's the example:
Game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=12222058")
My question is HOW DO YOU PRELOAD MODELS ?
So far i tried these solutions and they didn't work: - local merchant = game:GetService("ContentProvider"):Preload(0000000002)) - local merchant = game:GetService("InsertService"):Preload(0000000002) - local merchant = game:GetService("ContentProvider"):Preload("http://www.roblox.com/Merchant-item?id=0000000002") - local merchant = game:GetService("ContentProvider"):Preload(0000000002)) game:GetService("InsertService"):Insert(merchant)
I tried a lot more combinations of insert and preload i even tried using only the model ID instead of writing down the entire link. So far nothing worked....