I want to change the image on a Surface GUI whenever I a button.
The script is:
01 | script.Parent.MouseButton 1 Click:connect( function () |
02 | script.Parent.AutoButtonColor = false |
03 | script.Parent.Active = false |
04 | script.Parent.BackgroundTransparency = 0.3 |
05 | wait( 2 ) |
06 | script.Parent.Sound:Play() wait( 2 ) script.Parent.Sound:Stop() |
07 | script.Parent.Parent.Image.Image = ( "http://www.roblox.com/asset/?id=156684759" ) |
08 | wait( 60 ) |
09 | script.Parent.AutoButtonColor = true |
10 | script.Parent.Active = true |
11 | script.Parent.BackgroundTransparency = 0 |
12 | script.Parent.Parent.Image.Image = ( "http://www.roblox.com/asset/?id=158928904" ) |
13 | end ) |
Whenever I press the button, the Image on the Surface GUI goes white. I waited for a minute however the image didn't show.
Are you sure that the image id is correct? You need to subtract 1 from your id before pasting it into a decal or texture. For example, if your decal id=7648202 then you would change it to id=7648201. (The last number was changed)