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

Help with gui Image property? [closed]

Asked by 10 years ago

Basically I am wanting an image to be replaced with a different image when moused over, this is my code.

gui = script.Parent
gui.Image = "rbxassetid://154570980"

gui.MouseEnter:connect(function()
    gui.Image = "rbxassetid://154570976"
end)

gui.MouseLeave:connect(function()
    gui.Image = "rbxassetid://154570980"
end)

Output: 21:44:38.599 - Content failed because Input string was not in a correct format. 21:44:38.600 - Image failed to load: rbxassetid://15457_ovr.png: Request failed

An alternative I can think of is to have two images and make on visible when moused over and one not then vice versa.

Any help? What is the correct input for the "Image" property?

0
UPDATE: That exact code just randomly started working??? The error completely disappeared (same server about 30 seconds later). Perhaps the image wasn't loaded in? crackabottle123 110 — 10y

Locked by Articulating

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 10 years ago

Can't see any problem on your script. Everything seems right.

0
Really sorry about that, the image just wasn't loaded yet. crackabottle123 110 — 10y
Ad