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

InsertService cannot be used to load assets from the client?

When i use this it gives me the error InsertService cannot be used to load assets from the client

player = game.Players.LocalPlayer

game:GetService("InsertService"):LoadAsset(212641536):GetChildren()[1].Parent = player.Backpack

another thing to mention this is being used in a gui full script below

local GamePassService = game:GetService('GamePassService')
local PlayersService = game:GetService('Players')


local ID = 3265754

local player = game.Players.LocalPlayer
script.Parent.Parent.MouseButton1Click:Connect(function()
	if game:GetService("MarketplaceService"):PlayerOwnsAsset(player, ID) then
		game:GetService("InsertService"):LoadAsset(212641536):GetChildren()[1].Parent = player.Backpack
	else game:GetService("MarketplaceService"):PromptPurchase(player, ID)
	end
end)

1 comment

0

Big duh. You cannot load assets from the client for obvious reasons.

1 answer

✓ Accepted answer

This was answered already, but to sum it up, It means that you can not use Insert Service on the client (in a local script) for most methods such as 'Load Asset' due to exploiters and their ability to load arbitrary assets. You must use remote events to ask the server to pass an Instance of it to the client. To find out more information, here is the post that made this new decision public, and also provided an example.

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