I have a button that is very glitchy on the MouseEnter Event. What do i mean by glitchy? Well, Sometimes the events do not fire and nothing happens occasionally. Please Explain to me why it is glitchy and any ideas to fix it. Theres NO Output nor error.
local Image = script.Parent.Parent
local Text = script.Parent
local Detector = script.Parent.Detector
Detector.MouseEnter:connect(function()
Image:TweenPosition(UDim2.new(.01,0,.45), "Out", "Quad", .2)
Detector.Size = UDim2.new(Text.Size.X.Scale*2,0,1)
Detector.Position = UDim2.new(-1)
end)
Detector.MouseLeave:connect(function()
Image:TweenPosition(UDim2.new(0,0,.45), "Out", "Quad", .2)
Detector.Size = UDim2.new(Text.Size.X.Scale/2,0,1)
Detector.Position = UDim2.new(0)
end)
