ImageLabel not loading

Hello, I am trying to make a way for a textbox to pop up on an ImageLabel

For some reason, the ImageLabel is always says the property “IsLoaded” is false when I put in the DecalID

I’ve tried looking the problem up but have never found any working results

Here is some code:
*There is a RemoteEvent called DecalIDUpdate

ServerScript:

local image = script.Parent:FindFirstChild("SurfaceGui"):FindFirstChild("ImageLabel")
--local textBox = script.Parent:FindFirstChild("SurfaceGui"):FindFirstChild("TextBox")
local load = script.Parent:FindFirstChild("SurfaceGui"):FindFirstChild("TextLabel")
local event = game:WaitForChild("ReplicatedStorage"):WaitForChild("DecalIDUpdate")
local ID = script.Parent:WaitForChild("ID")

local function check(plr, txt)
	print(txt)
	ID.Value = tostring(txt)
	local oldImage = script.Parent.SurfaceGui:FindFirstChild("ImageLabel")
    if oldImage then
        oldImage:Destroy()
    end
    local newImage = Instance.new("ImageLabel")
    newImage.Size = UDim2.new(1, 0, 1, 0)
	newImage.Image = "rbxassetid://" .. tostring(txt)
    newImage.ImageTransparency = 0
    newImage.Parent = script.Parent:FindFirstChild("SurfaceGui")
    load.Text = " "
	print(newImage.Image)
end

event.OnServerEvent:Connect(check)

LocalScript, in StarterGui:

local RemoteEvent = game:WaitForChild("ReplicatedStorage").DecalIDUpdate
local Textbox = workspace.Map.Random:WaitForChild("Text").SurfaceGui.TextBox

Textbox.FocusLost:Connect(function()
	RemoteEvent:FireServer(Textbox.Text)
end)


UpdateDecalImage is not enabled

Thanks!

Just found the answer: had to use "rbxthumb://type=Asset&id="..txt.."&w=150&h=150", converting it to an ImageID.

Souce: https://devforum.roblox.com/t/type-decal-id-in-a-textbox-display-in-imagelabel/1221124

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