I made a button that if i Hover it, it will change the BackgroundTransparency to 0 and if I dont Hover it changes the BackgroundTransparency to 1.
My problem now is that when I leave the Button it does something what I don’t understand why it do that. It changes the BackgroundTransparency to 0 for a few seconds and then it goes back to 1 and then it changes the BackgroundTransparency to 1.
But If i hold on the button (so click it and then leave) then it works so how I want it.
I dont know how to explain this problem but if you dont know what i mean, here is a video:
Script:
local Panel = script.Parent.Panel
local Send = Panel.Send
Send.MouseEnter:Connect(function()
TweenService:Create(Send, TweenInfo.new(0.5), {
BackgroundTransparency = 0
}):Play()
end)
Send.MouseLeave:Connect(function()
TweenService:Create(Send, TweenInfo.new(0.5), {
BackgroundTransparency = 1
}):Play()
end)