Myzta
|
  |
| Joined: 20 Nov 2011 |
| Total Posts: 170 |
|
|
| 03 Apr 2016 03:42 PM |
local BackPackBut = script.Parent.Button
-- Functions function mouseE(b) b.ImageColor3 = Color3.new(171/255, 171/255, 171/255) end
function mouseL(b) b.ImageColor3 = Color3.new(1, 1, 1) end
-- Call Functions BackPackBut.MouseEnter:connect(mouseE(BackPackBut)) BackPackBut.MouseLeave:connect(mouseL(BackPackBut))
|
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 03 Apr 2016 03:44 PM |
local gui = script.Parent.Button
gui.MouseEnter:connect(function() gui.ImageColor3 = Color3.new(171/255, 171/255, 171/255) end)
gui.MouseLeave:connect(function() gui.ImageColor3 = Color3.new(1, 1, 1) end)
|
|
|
| Report Abuse |
|
|
Myzta
|
  |
| Joined: 20 Nov 2011 |
| Total Posts: 170 |
|
|
| 03 Apr 2016 03:46 PM |
| Is it not possible to keep it shorter and more organized like the way I did it? I have a lot more buttons to add. |
|
|
| Report Abuse |
|
|
|
| 03 Apr 2016 03:46 PM |
script.Parent.Button.MouseEnter:connect(function() script.Parent.Button.ImageColor3 = Color3.new(172/255,171/255,171/255) end) script.Parent.Button.MouseLeave:connect(function() script.Parent.Button.ImageColor3 = Color3.new(1,1,1) end)
r+://393244262r+:// |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 03 Apr 2016 03:48 PM |
for i,v in next, buttons:GetChildren() do v.MouseEnter:connect(function() v.ImageColor3 = Color3.new(171/255, 171/255, 171/255) end) v.MouseLeave:connect(function() v.ImageColor3 = Color3.new(1, 1, 1) end) end
|
|
|
| Report Abuse |
|
|