Confusion on custom texture IDs

  1. What do you want to achieve?
    I want the player to be able to insert IDs from the Roblox library into a floor texture on the client.

  2. What is the issue?
    The texture is being inserted, but it’s not appearing.

  3. What solutions have you tried so far?
    I have double checked the format is correct ("http://www.roblox.com/asset/?id=" .. ID).

Client Script:

local floorTexture = workspace.Area.Platform.FloorTexture
local customBox = script.Parent.Parent.CustomTextureBox

function onSelected()
	floorTexture.Texture = "http://www.roblox.com/asset/?id=" .. customBox.Text
end

script.Parent.MouseButton1Click:Connect(onSelected)

This may be a simple fix, any help is appreciated.

Could you try printing what customBox.Text could be? Chances are it could be the Decal/ID still loading possibly?

customBox.Text is the player’s inputted ID, so I don’t think thats the problem.

For further proof, here is what the Texture looks like:

image

Strange, could you maybe try different Textures to see if those will load? Also check if the Transparency of the Texture is not set to 1

Yes, I have tried a few random textures from the library. I also have another button which gives a random texture (not from the library), which it works. The transparency is set to 0.

That’s a decal id, not an image id. If you don’t want the players to go through the pain of manually finding the image id, you can probably use the rbxthumb:// content type.

floorTexture.Texture = string.format("rbxthumb://type=Asset&id=%s&w=420&h=420", customBox.Text)

Thank you, was just about to arrive to a similar conclusion.