The image won't display on a decal

So, what I am trying to is, by putting and ID, it displays an image onto a decal. But when I put the ID in, nothing happens.

script.Parent.MouseButton1Click:Connect(function()
	
	print("Worked")
	
	wait(1)
	
	local White_Board_1 = workspace.White_Boards.White_Board_1
	
	White_Board_1.Decal.Texture = "http://www.roblox.com/asset/?id=".. script.Parent.Parent.ID.Text
	
	wait(1)
	
	script.Parent.Parent:Destroy()
	
end)

Everything else works, the print does ad the destroy.

The decal ID is different in roblox studio, so i’m assuming you’re using the ID from the Roblox Library which explains no image coming up.

Yes, I took an ID from a decal from the library.

You may replace the texture ID by “rbxassetid://[DECAL ID]”.

I would recommend to preload the image with preloadAsync()

2 Likes

There should be a whole post on this problem. Can’t seem to find it tho.

But what do you mean by that (30 chars)

1 Like

So basically, the IDs in the Roblox Library (the website) are different on Roblox Studio. So if you copy and paste an ID from the Roblox Library to Roblox Studio, Roblox Studio will auto correct it to the ID in studio.

However, the players will be getting IDs from the library, and scripts cannot convert a library ID into a Roblox Studio ID, that’s why the spray paint tool has the annoying ‘retry’ button.

I believe there is a solution, and this problem has already been discussed A LOT in another post, so finding that post should help you.

1 Like

So how do I get a studio ID? (30 CHARS)

1 Like

Well, you can base yourself on my post

1 Like

There are 2 options, I think:

1.

  • The Decal has not been moderated or did not pass the Roblox moderation filter.

2.

  • It just needs more time to be moderated.
2 Likes