In short
InsertService:LoadAsset() only works in server code. A LocalScript that calls it gets this error. Either insert the model into your place in Studio and keep it in ReplicatedStorage, where every client can clone it, or load it from a server Script and put the result in ReplicatedStorage or Workspace.
What the message means
Players.Player1.PlayerScripts.Loader:4: InsertService cannot be used to load assets from the client
The usual reason to call it from a client is a menu or shop that shows a model. Those models are best added in Studio ahead of time, which also makes them load faster for players.
Even on the server, LoadAsset can only load some assets. Check the InsertService reference for the rules before relying on it.
Causes and fixes
Two things cause this error in practice. Each one below has the smallest code that triggers it, then the fix.
A LocalScript loads the model
A shop preview or a menu tries to fetch a model by its asset ID on the player's device.
local InsertService = game:GetService("InsertService")
local ASSET_ID = 123456789
local model = InsertService:LoadAsset(ASSET_ID)
model.Parent = workspace
Insert the model once in Studio (Toolbox, or right click a folder and insert from file), move it into ReplicatedStorage, and clone it in the LocalScript.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local template = ReplicatedStorage:WaitForChild("ShopPreview") :: Model
local model = template:Clone()
model.Parent = workspace
The asset must be loaded while the game runs
Sometimes the asset ID is only known at run time, for example from a config. The client still cannot load it.
local InsertService = game:GetService("InsertService")
local function showItem(assetId: number)
local model = InsertService:LoadAsset(assetId)
model.Parent = workspace
end
showItem(123456789)
Load it in a server Script, in a pcall because loading can fail, and parent it where clients can see it.
local InsertService = game:GetService("InsertService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local function loadItem(assetId: number): Instance?
local ok, result = pcall(function()
return InsertService:LoadAsset(assetId)
end)
if not ok then
warn("Could not load", assetId, result)
return nil
end
result.Parent = ReplicatedStorage
return result
end
loadItem(123456789)
Fix it in your place
Paste the error, RoCode fixes it in your place
Copy the line from Output and paste it here. RoCode opens the script it names in the place you have open in Studio, works out which of the causes above it is, and edits the code there instead of handing you a snippet to paste.
RoCode is an AI agent for Roblox Studio: it reads the scripts in the place you have open, finds the line and edits it there, and every change is an undo point. It runs on Windows or macOS with a desktop browser. Free to start, with free credits every day.
How to find the line that causes it
- Open Output (Window menu, or the Script tab), clear it with Ctrl+K (⌘K on Mac), and press Play.
- Find the first red line. It starts with the script's place in the Explorer and the line number, such as
ServerScriptService.Shop:12:. - Click the red line. Studio opens that script with the cursor on the failing line.
- Read the lines between
Stack BeginandStack Endunder it: they list the calls that led there, newest first, so you can see which function called the broken one. - Still not sure which value is wrong? Add
print(typeof(x), x)just above the line, or set a breakpoint on it and read the values in the Watch window.
Questions
Which assets can LoadAsset load?
Not every asset. The InsertService reference lists the rules for which assets a game may load. Assets you insert in Studio yourself avoid the question.
Is LoadAsset safe to use?
Load only assets you know. A model can contain scripts, and those run in your game once they are in Workspace or ServerScriptService.
Does it work in Studio play tests?
On the server side, yes. The client side gives this error in Studio and in live games alike.
Can RoCode fix it?
Yes. Paste the Output line into RoCode. It moves the loading to the server, or sets up a template in ReplicatedStorage, in your open place.
Sources and further reading
- Roblox Creator Docs: InsertService. LoadAsset and which assets it may load
- Roblox Creator Docs: ReplicatedStorage
How the code was checked: every block marked Fixed passes Luau's strict type checker against Roblox's API definitions (luau-lsp, 12 November 2026), and every block marked Breaks compiles and fails only when it runs. The message wording was checked against the strings in Roblox Studio itself (macOS build installed on 12 November 2026) on 12 November 2026. A type check catches misspelt APIs and wrong types, not game logic, so playtest in Studio before you publish.