Hello! I am trying to script some keybinds and can’t find any good tutorials that will help me.
I am trying to make a keybind that is pressed and changes an image in a gui, and when the button is pressed again it is reverted.
If someone could help me by pointing me in the right direction or even giving me some example code, it would be greatly appreciated.
bmcqqq
(bmcqqq)
#2
These two services are going to do what you want. They each have slightly different uses:
Read up on them and find out which works best for you. I usually use ContextActionService
since it is much easier to setup cross-platform support.
Here’s an example of how to set it up (using A
as the keybind):
game:GetService("ContextActionService"):BindAction("changeImageInGui", function()
-- Code to change the image goes here!
end, false, Enum.KeyCode.A)
1 Like
Thank you for your help, I have managed to get it to work. Now all I have to do is figure out how to layer keybinds.
system
(system)
Closed
#5
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.