Help image label image not showing up

Hi, I’m trying to make a painting similar to Bloxburg where you can enter the id and it will show up but every way I tried didn’t work. so I’m trying to see if anyone can help

If you need anything else please tell me

(this is the submit button local script)
script.Parent.MouseButton1Up:Connect(function()
	local img = script.Parent.Parent.ID.ContentText
	game.ReplicatedStorage.flags:FireServer(Imageimg)
	
end)

Could you show your entire local and server script code?

sure
here the script where the event leads to

game.ReplicatedStorage.flags.OnServerEvent:Connect(function(plr,img)
	local flags = plr.Character.Head.flags
	flags.Enabled = true
	flags.Flag.Image = img
end)
script.flags.Parent = script.Parent.Head

hopefully that helps

I’m guessing img is the raw ID itself.

You cannot just put an ID inside Image, you need to concatenate both rbxassetid:// and img together.

flags.Flag.Image = "rbxassetid://" .. img

i just tryed that it’s still not showing so i looked in the image and it shows that its there but its not showing up
image

Is the ImageLabel even visible? Can you try adding an image to it manually and see if it shows up?

yes it is visible i just added the same image manually and it showed up
image

Huh, that’s really weird.

I tested it out on a default baseplate and it worked for me. Are you sure the script is editing the right ImageLabel?

how are you doing it because this is how I’m doing it
image

I’m testing it with this script:

local RS = game:GetService("ReplicatedStorage")

local image = workspace.Part.SurfaceGui.ImageLabel
local decals = {5365990711, 1560823444, 6018156837, 6616948430, 876171815}

while true do
	image.Image = "rbxassetid://" .. decals[math.random(1, #decals)]
	task.wait(2)
end

can you try with an input
like a decal id

This does give an input, it gets an random decal ID from the decals array.

local decals = {5365990711, 1560823444, 6018156837, 6616948430, 876171815}

script.Parent.Parent.ID.ContentText

I don’t think it should be ContentText?
Shouldn’t it just be Text

Also,

game.ReplicatedStorage.flags:FireServer(Imageimg)
should probably be

game.ReplicatedStorage.flags:FireServer(img)

yea i accidentally typed that but i changed it back and it’s still not working lol

Did you also try changing ContentText to Text?

does it give a error?, that is the most easy way to find the bug

just did it and the same thing

No that’s why its so confusing

Can you print out the value of img in the server script?

ok here it is
image