-
What do you want to achieve?: I want to make an inventory gui for my custom inventory system
-
What is the issue? I have a dictionary with all the image decals’ “rbxassetid” I uploaded to my develop tab. But when I get the data from there and set the ImageLabel.Image of an Image label in the inventory to that rbxassetid://6706653266" for example, it just displays a blank screen. Also, ik im using the same assetid for my leaves as my stone, that is because the leaves were not getting accepted.
-
What solutions have you tried so far? I’ve tried only changing the “rbxassetid” to different things but I can’t find anything else that fits
This was just for me to learn data stores better and I just wanted to add some random item images so it will tie it up nicely.
Here is the relevant code:
--When press item pickup key
UIS.InputEnded:Connect(function(input, processed)
if input.KeyCode == Enum.KeyCode.H then
if mouse.Target then -- If the target exists
if mouse.Target:FindFirstChild("Pickable") then -- If the target is pickable
if player:DistanceFromCharacter(mouse.Target.Position) < 30 then -- If the player is close enough to the target(30 studs)
--Add it to inventory gui
local itemUI = game.ReplicatedStorage.ItemTemplate:Clone()
itemUI.Parent = invGUI.MainInvFrame.ItemsFrame
itemUI.ItemName.Text = mouse.Target.Name -- Sets the items name
itemUI.ItemImage.Image = imageDecals[mouse.Target.Name] -- Sets the items image. <<<<<<THIS IS THE PROBLEM
game.ReplicatedStorage.PickupItem:FireServer(mouse.Target) -- Ignore
end
end
end
end
end)
Table that is in a modulecript btw:
local imageDecals = {
Leaves = "rbxassetid://6706653266",
Wood = "rbxassetid://6706652011",
Stone = "rbxassetid://6706653266"
}
return imageDecals
Here is the error message with the decal(it’s not only this one it’s the same with all of them like my wood and leaves) :
Image https://assetdelivery.roblox.com/v1/asset?id=6706653266 failed to load. Error 403: Asset type does not match requested type
Here is what appears when it runs: