How to make print("helo) if imagebutton have image : XYZ. ( if imagebutton = XYZ then print("Hello) - How to make this
Thanks and best regard -PPJASK
How to make print("helo) if imagebutton have image : XYZ. ( if imagebutton = XYZ then print("Hello) - How to make this
Thanks and best regard -PPJASK
I'm not that good of a scripter but here's my solution.
local image = script.Parent
image.Changed:Connect(function()
if image.Image = "rbxassetid://example" then
-- Code goes here!
end
end)
We are getting the parent of the script and putting it into a variable for easy access. Then we check whenever the image is changed. We then check if the image's Image value is set to the required Image. If that is the case, then it will execute the code. Otherwise, nothing will happen.
This discussion is preserved as it was. New answers, comments, and votes are closed.