Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is there a way to pcall ImageLabel's Images? [SOLVED]

Asked by 3 years ago
Edited by JesseSong 3 years ago

This question has been solved by the original poster.

I am working on another plugin, where you can type in an rbxassetid to put on an ImageLabel, so without erroring I put a pcall. But it still errors! Is there a problem with my code?

local suc, err = pcall(function()
    imagelabel.Image = textbox.Text
end)
if not suc then
    textbox.Text = "ID Not available"
    textbox.TextEditable = false
    wait(1)
    textbox.Text = ""
    textbox.TextEditable = true
end

When I type in an invalid id(I usually just type a random key on my keyboard), the textbox's text IS "ID Not available", but there is still an error in my output.

If you know the answer, then please reply. Thanks, PoWerofThEePg

Answer this question