you could add an image button/text button inside the frame and scale it to 1,0,1,0.
Now you could use that imagebutton/textbutton to detect on mouse enter/leave.
local ButtonInsideFrame = -- define it
ButtonInsideFrame.MouseEnter:Connect(function()
-- Mouse Entered
end)
ButtonInsideFrame.MouseLeave:Connect(function()
-- Mouse Left
end)
You cant really use the MouseButton1Click function on a Frame. The only way to add a click event is to add a TextButton and Scale it to 1,0,1,0 so it fits the Frame perfectly. Optionally set the Background Transparency to 1.
local mouseon = nil
local MainMenu = -- define
script.Parent.MouseButton1Click:Connect(function()
mouseon = MainMenu.ExploreFrame
end)
also make sure to give it a higher Zindex so it can be in the top
don’t change the button’s visiblity property to true tho you can just change the backgroundtransparency to 1 and its text to “”
local button --- button spot
button.MouseButton1Click:Connect(function()
-- stuff here
end)