It won't print "hi", or anything else I tell it to do. Code:
1 | button = script.Parent.Framebase.go |
2 |
3 | function onClick() |
4 | print ( "hi" ) |
5 | end |
6 |
7 | button.MouseButton 1 Down:connect(onClick) |
button properties: http://gyazo.com/59330a65a57a533cb5315b68176f10ae I've been trying to figure this out for a while now.. Can't seem to figure it out though. Help would be appreciated!
Try this:
1 | local button = script.Parent.Framebase.go |
2 |
3 | button.MouseButton 1 Click:connect( function () |
4 | print ( "Put your code here!!!" ) |
5 | end ) |
That should work; your properties seem fine.
You gotta define the Mouse so put this at the top
1 | local character = game.Workspace.Player |
2 | local player = game.Players:GetPlayerFromCharacter(character) |
3 | local mouse = player:GetMouse() |
then you got it working.