For some odd reason, MouseEnter doesn’t work while in a local script, yet it functions in a module. For example:
I have a custom leaderboard which is controlled by a local script. Everything functions fine but the color tweening. I have another custom leaderboard which is in a module, there is a local script which refreshes the playerlist for it to work, yet the MouseEnter actually works on that.
MouseEnter, MouseLeave are very broken events. If anything create a custom Mouse Enter-Leave
It requires knowledge of basic math.
Checking weather the mouse X and mouse Y is bigger the topLeft of the button. But lower in the bottom right. From there you can tell if its inside or not.
local isInButton = false
Mouse.Move:Connect(function()
local topLeft = button.Position + button.Size
local bottomRight = button.Position - button.Size
if Mouse.X > topLeft.X and Mouse.Y > topLeft.Y then
if mouse.X < bottomRight.X and mouse.Y < bottomRight.X then
if isInButton then return end
isInButton = true
print("isInButton")
end
end
end
Thats just a rough example. Most likely wont work. But it’s an draft/pseudo of the idea I am talking about.
If you needed someone to help you understand how to actually reproduce something like this event wise. Just hit me up on discord. You already have me on discord.