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.
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
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)