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

Image not changing when it is told to, just changing to a white image?

Asked by 4 years ago

Hi, I recently made this script:

local val = true
script.Parent.MouseButton1Click:Connect(function()
    if val == true then
    script.Parent.Image = "http://www.roblox.com/asset/?id=4968347853"
    val = false
    else
    script.Parent.Image = "http://www.roblox.com/asset/?id=4968348079"  
    val = true
    end  
end)

And whenever I actually click on the Image Button, it just goes white and (the image) does not change to the asset id I want it to change to. I am also not getting any errors when I do click it. Ideas?

0
well its bcs ur asset, mine work perfectly fine. Friskyman321 121 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago

You need to be using an Image not a Decal. To do this you got 2 options. Either get a decal, put your decal in it and copy the link it gives u roblox will convert it to an image. Or you can open up the developer panel and manually create one. Your choice.

0
thanks WideSteal321 773 — 4y
Ad

Answer this question