Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

My Surface GUI image button is not working when I click on it. How to fix?

Hi Everyone!

I have an image button on a surface gui with this script

script.Parent.MouseButton1Click:Connect(function()
	print("test")
end)

Nothing prints in the output when I click for some reason, idk if its the script.

Any help is apreciated!

5 comments

0

rather than using mousebutton1click use mousebutton1down and see if it makes a diffrence

0

nope. I also tried activated, but that was a dud too. Thank you anyways!

0

Did you put the script in a local script?

0

yes

0

It should be in a script instead

1 answer

✓ Accepted answer

If you put that script in a local script, then it would not work, but if you put that script in a script instead of a local script then it would work fine.

1 comment

0

It worked! Thanks a lot :D

This discussion is preserved as it was. New answers, comments, and votes are closed.