Roblox Studio error

InsertService cannot be used to load assets from the client

What InsertService cannot be used to load assets from the client means in Roblox Studio, the two things that cause it with the code that triggers each, and the fix for each one.

Updated 12 November 20263 min readErrorLuauWritten by

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.

On this page
  1. What it means
  2. Causes and fixes
  3. Fix it with RoCode
  4. Find the line
  5. Questions
  6. Sources

What the message means

Output (example)
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.

Breaks LocalScript in StarterPlayer.StarterPlayerScripts named Loader
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.

Fixed LocalScript in StarterPlayer.StarterPlayerScripts named Loader
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.

Breaks LocalScript in StarterPlayer.StarterPlayerScripts named ItemViewer
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.

Fixed Script in ServerScriptService named ItemLoader
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.

For example: Players.Player1.PlayerScripts.Loader:4: InsertService cannot be used to load assets from the client

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

  1. Open Output (Window menu, or the Script tab), clear it with Ctrl+K (⌘K on Mac), and press Play.
  2. Find the first red line. It starts with the script's place in the Explorer and the line number, such as ServerScriptService.Shop:12:.
  3. Click the red line. Studio opens that script with the cursor on the failing line.
  4. Read the lines between Stack Begin and Stack End under it: they list the calls that led there, newest first, so you can see which function called the broken one.
  5. 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

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.

More Roblox errors

All Roblox Studio errors

Stop hunting errors line by line.

RoCode reads the scripts in your open place, fixes the error where it happens and tells you what it changed. Free every day, no card required.