Greetings to all. While I am normally able to solve minor problems on a self-taught routine, I have accrued many open questions as to why the concept of using Image Buttons isn't able to work for me at the present.
The primary purpose of my game interface(Referring to GUI's Henceforth) is to undergo a change of what image is displayed on the ImageButton Object upon mouse over. It had worked well with the default interface scripts, but something opened up not much later.
Firstly, even after all [possible(I say such due to me being a tyro, or beginner with coding)] variable declarations, Image resizing and centering methods, and checking if properties are not changed upon the image change step, The button image simply disappears and can not be reclaimed no matter what code I use to change the image once or many times more.
Now, the main point I had wished to address is that I require insight as to what code can be added or changed to a script to help resolve such a vexing issue.
local MDSettingButton = script.Parent MDSettingButton.Image = 'rbxassetid://1462236742'
Whenever trying to do anything at all after that code has run, the image button does not respond and is invisible. Every object and script placed within it works as desired, as a side factor.
Bewildered; I went on about things that could have been the solution, such as: "Perhaps the Image Button's Image position is reset somewhere off-screen upon change? Perhaps I have to set something else true or false to the properties?"
Once again, I am essentially new with coding concepts, and keep in mind that I have already supplied High-Definition Buttons that are centered perfectly and have no conflict mechanically. I simply wish to learn something new and be able to use it with less help every time I succeed with it.
Roblox doesn't like to load in asset ids unless they're already preloaded into the game. you can always make a decal and insert it into the script, change the Decal texture to your image, then change the script to something like this:
local MDSettingButton = script.Parent MDSettingButton.Image = script.Decal.Texture