|
| 15 Jan 2016 09:37 PM |
Whats this fix to this? As of right now whenever I click my frame it acts as if the mouse leaves and enters the frame. Code:
local Buttons = script.Parent:GetChildren()
local function TransparencyLerp(Current, Final, Alpha) return Current + Alpha(Final - Current); end
for _, Button in next, Buttons do if Button.Name == "Button" then Button.InputBegan:connect(function(Input, GPE) if not GPE then else return end print'Entered' end) Button.InputEnded:connect(function(Input, GPE) if not GPE then else return end print'Ended' end) end end
#code decryptme /---./--/..--/..//-.// |
|
|
| Report Abuse |
|
|
|
| 15 Jan 2016 10:05 PM |
++
#code decryptme /---./--/..--/..//-.// |
|
|
| Report Abuse |
|
|
|
| 15 Jan 2016 11:13 PM |
bump
#code decryptme /---./--/..--/..//-.// |
|
|
| Report Abuse |
|
|
lolb3
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 2268 |
|
|
| 15 Jan 2016 11:14 PM |
Not entirely sure what you're trying to describe here, but this makes 0 sense
if not GPE then else return end Why not just do if GPE then return end |
|
|
| Report Abuse |
|
|
|
| 15 Jan 2016 11:16 PM |
But thats not my issue. Whenever I click the gui the mouse acts like its enters the frame again and when the click is release it acts like it leaves the frame.
#code decryptme /---./--/..--/..//-.// |
|
|
| Report Abuse |
|
|
lolb3
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 2268 |
|
| |
|
|
| 15 Jan 2016 11:26 PM |
Thats not the issue either.
#code decryptme /---./--/..--/..//-.// |
|
|
| Report Abuse |
|
|
lolb3
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 2268 |
|
|
| 15 Jan 2016 11:29 PM |
My best guess is that the "InputBegan" and "InputEnded" fire when the mouse enter/leave the button, in addition to any mouse clicks and stuff. Also, I'd check the type of your button instead of checking it's name. |
|
|
| Report Abuse |
|
|