And you’re sure the button is named “Play,” and not “TextButton” (for example)? You should see the message in your output window when you play test, and click on the button.
:Connect
and :connect
both work. It’s good practise to use :Connect
, however, as :connect
is deprecated.
thats deprecated, thats not the problem here.
this really should work, can you show me and open the things in the “screen” frame, it must be a different class then a textbutton, probably a textlabel.
I renamed it from text label though.
Turns out I didn’t, what do I need to name it to?
Just to shorten your code. I wouldn’t add the variables.
A much easier way of doing this would be
script.Parent.MouseButton1Down:Connect(function()
print("Clicked")
end)
Also make sure that this is inside a LocalScript inside the button.
EDIT: This method works. I got the output in the output window. My explorer looks like this:
Ok, I’ll try that. 30 characters
1 Like