I want to change the image on a Surface GUI whenever I a button.
The script is:
script.Parent.MouseButton1Click:connect(function() script.Parent.AutoButtonColor = false script.Parent.Active = false script.Parent.BackgroundTransparency = 0.3 wait(2) script.Parent.Sound:Play() wait(2) script.Parent.Sound:Stop() script.Parent.Parent.Image.Image = ("http://www.roblox.com/asset/?id=156684759") wait(60) script.Parent.AutoButtonColor = true script.Parent.Active = true script.Parent.BackgroundTransparency = 0 script.Parent.Parent.Image.Image = ("http://www.roblox.com/asset/?id=158928904") 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)