Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 4 years ago

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!

0
rather than using mousebutton1click use mousebutton1down and see if it makes a diffrence TickoGrey 116 — 4y
0
nope. I also tried activated, but that was a dud too. Thank you anyways! JustAnotherGaming 48 — 4y
0
Did you put the script in a local script? JealousRegretHate 34 — 4y
0
yes JustAnotherGaming 48 — 4y
0
It should be in a script instead JealousRegretHate 34 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago

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.

0
It worked! Thanks a lot :D JustAnotherGaming 48 — 4y
Ad

Answer this question