Decal not displaying for player

hey everyone, so while i was working in a stud-rp game, i wanted to make it so that they can also choose a custom flag for their country, but the problem is that after they type in the id they want for the flag in the custom flag chooser, the flag is just gonna be a white background, and this has been a problem in one of my games for a pretty long time, so i need help to fix it

server script:

game.ReplicatedStorage.ChangeCustomFlag.OnServerEvent:Connect(function(player, text)
	local char = player.Character
	local billboardgui = char.Head.BillboardGui
	billboardgui.ImageLabel.Image = "http://www.roblox.com/asset/?id="..text
end)

localscript:

script.Parent.MouseButton1Click:Connect(function()
	local text = game.Players.LocalPlayer.PlayerGui.Settings.CustomFlag.TextBox.Text
	game.ReplicatedStorage.ChangeCustomFlag:FireServer(text)
end)

i also tried to use “rbxassetid://” but this also didn’t work, any help would be appreciated

1 Like

The issue is likely that you are not setting the ImageTransparency of the ImageLabel to 0. Try adding this line to your server script:


billboardgui.ImageLabel.ImageTransparency = 0
1 Like

the billboardgui is still visible above the player’s head, it’s just that it’s always blank if we set a custom flag that the player needs

1 Like

In addition to setting the ImageTransparency, you may also need to set the Size of the ImageLabel. Try adding this line to your server script:

billboardgui.ImageLabel.Size = Vector2.new(256, 256)
1 Like

the imagelabel is also perfectly sized

2 Likes

A few troubleshooting options:

  • Make sure you are using the Image ID not the actual Decal ID.
  • Has ImageBackground been set to 1?
  • Are there any other frames, images, or guis overlapping the image?
  • Have you set your LayoutOrder in properties for the image to not conflict with the previous point?
  • Are the decals you are inputting moderated perhaps?
2 Likes

thanks, i just noticed i need to enable the “isloaded” property in the imagelabel

1 Like

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