function onEnter() script.Parent.BackgroundTransparency = 0.7 end script.Parent.MouseEnter:connect(onEnter) function onLeave() script.Parent.BackgroundTransparency = 1 end script.Parent.MouseLeave:connect(onLeave)
i was wondering if one could combine these scripts to make them cleaner and faster
Well, you could use a different connection line. It takes up less space and looks a bit neater.
script.Parent.MouseEnter:connect(function() script.Parent.BackgroundTransparency = 0.7 end) script.Parent.MouseLeave:connect(function() script.Parent.BackgroundTransparency = 1 end)