Unable to cast double to Content

I am trying to get an editable mesh using :CreateEditableMeshAsync(),
however, “Unable to cast double to Content” pops up at line 9
i dont really know where to start to try to get around this

script

local event = game.ReplicatedStorage.Events.InsertModels
local marketplaceservice = game:GetService("MarketplaceService")

local insertservice = game:GetService("InsertService")
local assetservice = game:GetService("AssetService")

event.OnServerEvent:Connect(function(player,idx)
	print("created")
	local mesh = assetservice:CreateEditableMeshAsync(idx)
	
	mesh.Parent = game.ReplicatedStorage
	
	local ItemFrame = game.ReplicatedStorage.ItemFrame:Clone()
	ItemFrame.Name = "ItemFrameClone"
	ItemFrame.Parent = game.ServerStorage
	local Name = ItemFrame.Name
	local Model = ItemFrame.Item.Model

	local assetdesc = marketplaceservice:GetProductInfo(idx)
	ItemFrame:FindFirstChild("Name").Text = assetdesc.Name
	ItemFrame.Parent = player.PlayerGui.EnemyEditorGUI.Editor
end)

If idx is just a number, try doing this:

local mesh = assetservice:CreateEditableMeshAsync(`rbxassetid://{idx}`)

CreateEditableMeshAsync expects a content url, not just a number

now its just saying this
AssetService:CreateEditableMeshAsync is not yet available!

The feature is in beta, so it only works in studio.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.