Button does nothing after being pressed

I am trying to make it so that when a player clicks on a button it would print something, however it does not do that. A script similar under another button would work as long as it is not in the same frame (pets). I have not found any solution online and thought that this would work, can anyone (if possible) explain why my code is wrong?

this is what is in the script:

script.Parent.Activated:Connect(function()
	print('should print this')
end)

If you could help then thanks

1 Like

Intead of using activated, use MouseButton1Click. Thats way it only works when the button is pressed

Example:

script.Parent.MouseButton1Click:Connect(function)
print()
End)

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

Activated does not do anything for a gui as of clicking.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.