ImageLabel does not have a image

So, my problem is NOT the code, i think so atleast, but it is more of a what do i call it, a possible studio bug?
So, this is my code.

local Slide = 1
local Slides = {
--The decals go here, ex:
   "SOMEID",
   "SOMEOTHERID"
}
local Allowed = {"BratTeo"}

script.Parent.NextCD.ClickDetector.MouseClick:Connect(function(plr)
	if table.find(Allowed,tostring(plr)) then
		if Slide < #Slides then
			Slide = Slide+1
			local SlideData = tostring(Slides[Slide])
			script.Parent.ImageLabel.Image = "rbxassetid://"..SlideData
			print(script.Parent.ImageLabel.Image)
		end
	else
		print("[PROJECTOR]: USER NOT ALLOWED: "..plr)
	end
end)

script.Parent.BackCD.ClickDetector.MouseClick:Connect(function(plr)
	if table.find(Allowed,tostring(plr)) then
		if Slide > 1 then
			Slide = Slide-1
			local SlideData = tostring(Slides[Slide])
			script.Parent.ImageLabel.Image = "rbxassetid://"..SlideData
		end
	else
		print("[PROJECTOR]: USER NOT ALLOWED: "..plr)
	end
end)

So, the problem that is happening is, the image gets changed to “rbxassetid://IDFROMSLIDES”, but the problem is that it does set it into the property window, it is not visible ingame though, i do not get any errors.

1 Like

Is this in a local script?
Is the Image Label a child of a screen Gui or another Gui of some sort?

This is in a serverscript, here is how it’s set up.
image

1 Like

Ok well I’ve found something and it raises a question
Does the background of the image label display? – Mine does not
if so then try using a decal and see what happens

Well the thing is, if i set the image manually by using

workspace.Projector.Model.Model.Mover.SurfaceGui.ImageLabel.Image = "rbxassetid://SomeRandomId"

it does work and appears, but if i set it using the script i provided it does not.

1 Like

Can you try printing SlideData before setting the image?

That returns this.
image
And the other print returns this.
image

Hmm this is weird it works fine for me even with your script set up with one of my ids(the slide if statements commented out also)
Are you sure the Id is correct?

I am completely sure the id’s correct, let me give you the version with the id’s.

local Slide = 1
local Slides = {
	"5968357384",
	"5968357675",
	"5968357877",
	"5968358115"
}
--Put your slides here in order.
local Allowed = {"Jxaak","BratTeo"}

script.Parent.NextCD.ClickDetector.MouseClick:Connect(function(plr)
	if table.find(Allowed,tostring(plr)) then
		if Slide < #Slides then
			Slide = Slide+1
			local SlideData = tostring(Slides[Slide])
			print(SlideData)
			script.Parent.ImageLabel.Image = "rbxassetid://"..SlideData
			print(script.Parent.ImageLabel.Image)
		end
	else
		print("[PROJECTOR]: USER NOT ALLOWED: "..plr)
	end
end)

script.Parent.BackCD.ClickDetector.MouseClick:Connect(function(plr)
	if table.find(Allowed,tostring(plr)) then
		if Slide > 1 then
			Slide = Slide-1
			local SlideData = tostring(Slides[Slide])
			script.Parent.ImageLabel.Image = "http://www.roblox.com/asset/?id="..SlideData
		end
	else
		print("[PROJECTOR]: USER NOT ALLOWED: "..plr)
	end
end)