I have a row of buttons, I added effects for when the mouse enters/leave the button but when the mouse quickly moves, it sometimes doesn't detect. I don't have any wait() in the function.

I searched ROBLOX Wiki trying to find a better way but I haven't found any. This is my script:

Button.InputEnded:Connect(function()
	print("a")
	Button.BorderSizePixel = 0
end)