How do I show imageLabel.Image using a string and an IntValue

so I tried to set a script of ImageLabel so player know what item is it, but it’s doesnt show up, is this the right way?

imageLabel.Image = ("rbxassetid://".. tostring(IntValue.Value))

Can you give more info?

30charsssssssssssssssss

I don’t think you need the parentheses.

imageLabel.Image = "rbxassetid://"..tostring(IntValue.Value)

All “int” (It’s double because Lua 5.1 doesn’t support integers) values gets converted to stirng so tostring(IntValue.Value) is redundant.

What is the value for the intValue.Value? The problem might com from there.

I tried this also, it doesnt work

The IntValue prepresent the ImageID, basically I want to set ImageID from a script

How exactly do you set the IntValue’s value in your game?

Try this:

imageLabel.Image = "http://www.roblox.com/asset/?id="..IntValue.Value

Create a IntValue using the plus sign, then set the Thumbnail ID

I tried this and it didn’t work

Can you show us the variable you set for imageLabel? This could be the problem.

template.Thumbnail.Image = “http://www.roblox.com/asset/?id=”… furniture[item].ThumbnailId.Value

template is the button template
Thumbnail is the ImageLabel
ThumbnailId is the Image Id

try using a stringvalue instead

The issue could be you’re calling the template variable too early. You need to call PlayerGui, then include a :WaitForChild(). Should be PlayerGui:WaitForChild("Template"), the Template is reffering to a ScreenGui object.

local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")
local Thumbnail = PlayerGui:WaitForChild("Template").Thumbnail
Thumbnail.Image = "http://www.roblox.com/asset/?id=" .. furniture[item].ThumbnailId.Value

Still doesn’t work, sadddddddddd

are there any errors in output?

No, there is no error, but when the game load early a bit, there is a image request fail

Also, I check the localPlayer.PlayerGui, and it’s suprise me that the Image is set, put no picture showing

this seems to work
Baseplate.rbxl

I don’t know why it’s not for me, btw can you test if the IntValue in the RepStorage