Basically what i want to do is when my mouse is hovering over a TextButton i can press a key and it'll detect it. How would i go about doing this? Heres the code i wrote but it doesn't work:
button.MouseMoved:Connect(function()
mouse.KeyDown:Connect(function(input)
print(input)
if input.KeyCode==Enum.KeyCode['F'] and button.favorite.Visible==false then
button.favorite.Visible=true
else
button.favorite.Visible=false
end
end)
end)

1 comment
KeyDown is deprecated, please practice UserInputService.