Hello, Im trying to load a asset into a mesh with insertservice but I keep running into a issue. Roblox is returning an error “invalid argument #3 (string expected, got Instance)”. Is there any way to fix this?
game.ReplicatedStorage.Events.AddPotion.OnServerEvent:Connect(function(plr,color,perk,sc)
local colors = {
Purple = "7106151441",
Yellow = "7106435832",
Green = "7106432255",
Orange = "7106431788",
Blue = "7106184564",
Pink = "7106433027",
Red = "7106434713"
}
local colorNOW
for key, value in pairs(colors) do
if key == color then
colorNOW = value
end
end
newPotion.ImageLabel.ViewportFrame.Main.TextureID = game:GetService("InsertService"):LoadAsset(tostring(colorNOW))
end)