GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
|
| 18 Dec 2016 08:39 PM |
any way to make this less glichy?
for i,btn in pairs(player.PlayerGui.MainGui.Main:GetChildren()) do if btn:IsA'ImageButton' then btn.MouseEnter:connect(function() textLabel.Text =btn.Name end) btn.MouseLeave:connect(function() textLabel.Text ='' end)end end |
|
|
| Report Abuse |
|
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
|
| 18 Dec 2016 08:40 PM |
| or actually can you select a gui with mouse.Move:connect(function() instead? of hover |
|
|
| Report Abuse |
|
|
|
| 18 Dec 2016 08:43 PM |
Yea, you can get the Mouse's x and y, then determine if they are over the Position of Gui, and under Position+Size of gui.
~Who's awesome? You're awesome! |
|
|
| Report Abuse |
|
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|
|
| 18 Dec 2016 08:47 PM |
put the frame inside of another frame
if the mouse is moved off of a gui then it can be a bit glitchy |
|
|
| Report Abuse |
|
|
|
| 18 Dec 2016 08:49 PM |
inside = false
btn.MouseEnter:connect(function() if not inside then return end inside = true print('inside') end)
btn.MouseLeave:connect(function() if inside the return end inside = false print('outside') end)
I like cake. |
|
|
| Report Abuse |
|
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
|
| 18 Dec 2016 08:56 PM |
| how do i do what captain said |
|
|
| Report Abuse |
|
|
|
| 18 Dec 2016 08:57 PM |
| that would require some sort of loop so not 'efficient' |
|
|
| Report Abuse |
|
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
|
| 18 Dec 2016 09:04 PM |
| already have it so it would save space lol |
|
|
| Report Abuse |
|
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|