Image ID not loading for Decals in Roblox

Hello DevForum! I need your help with a little issue I just found in my game! D:
Basically, I’m doing like a social app in Roblox. I’ve done a posting messages system, community system (basically similar to Discord), etc. But, I’ve recently discovered that when you go to the Settings category (in-game), and wen you add the ID of any decal to make it a profile picture in-game, it doesn’t work basically. The image doesn’t appear, making it an useless feature.

This is how it should show up if it works properly:

Also, here’s the code if anyone’s wondering:

local Player = game.Players.LocalPlayer
local playerIcons = game.Players:GetUserThumbnailAsync(Player.UserId, Enum.ThumbnailType.AvatarBust, Enum.ThumbnailSize.Size420x420)
local PlayerIcon = script.Parent.ProfilePicture

wait(1)

local ListSettings = script.Parent.ListSettings

while task.wait(1.5) do
	if playerIcons then 

		if ListSettings.ImageSettings.CustomProfileText.Text == "" or ListSettings.ImageSettings.CustomProfileText.Text == "0" then
			PlayerIcon.Image = playerIcons
		else
			if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(game.Players.LocalPlayer.UserId, 104810315) then --Profile Picture Loader.
				PlayerIcon.Image = "http://www.roblox.com/asset/?id=".. ListSettings.ImageSettings.CustomProfileText.Text --Adds to the image the link to the decal
			else
				PlayerIcon.Image = playerIcons
			end
		end

		script.Parent.Username.Text = "@".. Player.Name
	end

	if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(game.Players.LocalPlayer.UserId, 104810144) then
		script.Parent.Username.TextColor3 = ListSettings.ColorHex.HexColorName.HexColorShow.BackgroundColor3
	else
		script.Parent.Username.TextColor3 = Color3.fromRGB(255, 255, 255)
	end

	script.Parent.Background.BackgroundColor3 = ListSettings.ColorHex.CustomBackgroundText.HexColorShow.BackgroundColor3
	script.Parent.ProfilePicture.BackgroundColor3 = ListSettings.ColorHex.CustomBackgroundText.HexColorShow.BackgroundColor3
end

I don’t know why this is happening, and I need to find a way to fix this or else the gamepass will literally be useless. Any information will be helpful for me, thanks!

hi! :wave:
if you’re running code which have messed up line, it will throw you an error, so, if there’s anything in the output window - make sure to let us to look at it!

1 Like

You would need to place that number into a decal. If you do that you will notice that 14628885328 gets changed to 14628885307. If you use that number it should work.

2 Likes

instead of that large link thing, I’d use rbxassetid://0000000 format as it also changes id of the asset

for me it works fine

1 Like

As far as I know, Roblox doesn’t have any functions to get an Image ID from a Decal.

This could possibly help:

With the information provided above, you would just replace the line that changes the PlayerIcon to this:

PlayerIcon.Image = string.format("rbxthumb://type=Asset&id=%s&w=420&h=420", ListSettings.ImageSettings.CustomProfileText.Text)
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.