In my game, there’s a feature where players can put any image id of their choice, however with that my console gets spammed with this “Failed to load sound: Asset type does not match requested type”.
Any way of getting rid of it?
In my game, there’s a feature where players can put any image id of their choice, however with that my console gets spammed with this “Failed to load sound: Asset type does not match requested type”.
Any way of getting rid of it?
Use the pcall() function to remove any error.
Here is how to implement it:
pcall(function()
-- Your code
end)
It still throws an error for some reason.
use:
local succes, errorMessage = pcall(function()
--Code
--Example:
Asset.AssetId = input
end)
if errorMessage then
--Here you can display that the id didnt work and notification or smth
end
Like I said, it still throws an error even though I am using protected calls.
Can you share the whole code with us then please?
same thing happens when you use soundids, think its just a roblox thing