|
| 23 Sep 2014 01:02 PM |
I don't remember, but what is that function that occurs with the mouse that it'll do a function when it is hovering over a button?
|
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 23 Sep 2014 01:21 PM |
I used the functions because I wanted to make it so when you hover over a button, it'll show the text box, and it'll disappear when you take the mouse off of it. However, it'll only do this process once. I want it to do this an infinite number of times. How do I do this?
plr = game.Players.LocalPlayer local mouse = plr:GetMouse() local button = script.Parent local text = button.Parent.TextLabel
text.MouseEnter:connect(function(x, y) text.Visible = true end) text.MouseLeave:connect(function(x, y) text.Visible = false end) |
|
|
| Report Abuse |
|
|
|
| 23 Sep 2014 01:23 PM |
| And also the textbox doesn't appear when I put my mouse over it although I made a function so that way it'll appear when the mouse enters the button! |
|
|
| Report Abuse |
|
|
|
| 23 Sep 2014 01:37 PM |
| These events can only be used for TextButtons. |
|
|
| Report Abuse |
|
|
|
| 23 Sep 2014 01:38 PM |
| I know, this is being used for a textbutton. For a menu in a game. |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 23 Sep 2014 01:45 PM |
Use text.Transparency The Visible property normally disables most events on the item, I'm sure. |
|
|
| Report Abuse |
|
|
|
| 23 Sep 2014 01:59 PM |
| Thanks Lunate! I just had to change text to button in the functions so it'll rely on button being highlighted instead of the box itself! |
|
|
| Report Abuse |
|
|
|
| 23 Sep 2014 02:18 PM |
| New problem, It works just fine in studio, but Online it says that the variable plr is a nil value! Solutions? |
|
|
| Report Abuse |
|
|
|
| 23 Sep 2014 02:21 PM |
| On line 2 to be specific, so focus on line 2! |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 23 Sep 2014 02:25 PM |
| LocalPlayer is only valid in LocalScripts |
|
|
| Report Abuse |
|
|