How would I make it so a certain frame on my GUI turns into a different color when the mouse hovers over it?
The following will change it to Black when you hoverer it and will set it to grey when you are done hovering. MouseEnter, and MouseLeave events fire when the mouse enters and leaves the frame.
local Frame = ---
Frame.MouseEnter:Connect(function()
Frame.BackgroundColor3 = Color3.FromRGB(0,0,0)
end
Frame.MouseLeave:Connect(function()
Frame.BackgroundColor3 = Color3.FromRGB(128,128,128)
end
1 Like