- What do you want to achieve?
working on an inventory system
I want an image of the item in the background. and the image needs to change every time the item in that slot changed
- What is the issue?
the image will not show
the output says :" Image “https://assetdelivery.roblox.com/v1/asset?id=2612713853” failed to load in “Players.LocalPlayer.PlayerGui.CoreGui.RightDisplay.Backpack.Container.Container.Bac1.Icon.Image”: Request failed](rbxopenprop://0%2e3086718/Image)"
- What solutions have you tried so far?
- Image failed to load – mentioned copying from the image id
- Can't seem to load image – mentioned that the image id might be wrong so used “2612713854” and “2612713855”
- Images not loading [SOLVED] – mentioned subtracting 1 so tried from 1 to 10 (manually)
- having the image already loaded in a different image button
- game:GetServiceContentProvider’:PreloadAsync(…) (same error but faster)
- rbxassetid://
- http://www.roblox.com/asset/?id=
- let the script change the image, hit enter on the property after it changed
The script does adjust the image property in the image
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
the script
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ItemDictionary = require(ReplicatedStorage.Core.Dictionarys.ItemDictionary)
function onItemChange()
local Item = script.Parent.ItemName.Text
local newimage = "rbxassetid://"..tostring(tonumber(ItemDictionary[Item]["ImageId"])-1)
--print (newimage)
script.Parent.Icon.Image = newimage
end
script.Parent.ItemName:GetPropertyChangedSignal("Text"):Connect(onItemChange)
the dictionary
local ItemDictionary = {
["Sword"] = {
["Description"] = "a training sword",
["BackpackStackSize"] = 1,
["BankStackSize"] = 1,
["Value"] = 0,
["ModelId"] = 0,
["ImageId"] = 2612713854,
},
}
any suggestions are welcomr