I was working on a bigger problem and i noticed that my script was having problems changing a imagelabel.Image and also the text on a text label wouldnt change. I tried it out on a simplified version by just clicking a text button the gui imagelabel.Image would change but it isnt. I tried multiple ways of changing the image id from rbxassetid://862865537 to just 862865537 but it doesnt work. I know it is simple coding but i am just stumped on why its not working.
player = game.Players.LocalPlayer
local idi = "rbxassetid://862865537"
local slots = game.StarterGui.backpackgui.mainframe.Frameright
script.Parent.MouseButton1Click:Connect(function()
slots.slot1.ImageLabel.Image = idi
print("clicked")
end)

2 comments
Was your purpose of this to change the image that is currently visible on your PlayerGui?
its a imagelabel in a slot for the inventory and before i was trying to change the imagelabel from a table when something goes into my inventory but i was having problems and thought it was something else but now even when i just try to change the imagelabel in a simple format it still doesnt work.