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

Gui Button click not working - Button Mouse click seems not to be detected. Can somebody help?

So I made a code that should print "hi" but it doesn't work. I think I done it well. Why doesn't work? Pls help.

Here The code screenshot

5 comments

0

I can't reach the screenshot.

0

Edited

0

Put the script in the button and then change the [script.Parent.Buy] to [script.Parent] then it should work. Or there is another item named "Buy"

0

Ok thanks

0

Please Accept My Answer As It Worked.

2 answers

not sure if you still need help but they seems to be a mini change for it you get

script.Parent.MouseButton1Click:Connect(function()

	end

you don't want that you want to use that you want to use

script.Parent.MouseButton1Click:Connect(function()

end)

then you put the code in Line 2

Just do

script.Parent.Buy.MouseButton1Click:Connect(function()
print("hi")

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