I know about KeyDowns.
function onKeyDown(Key) key = key: lower() if key == "c" then
But how would you make it so players can enter a key from a GUI, and then that'll be the key for the function?
I don't think you really know what you're talking about.. But I'll explain to you the functions capability..
Player = game.Players.LocalPlayer -- Up to the player to trigger mouse = Player:GetMouse() -- Finding the players mouse. function onKeyDown(Key) -- onKeyDown could be named anything... It's a function key = key:lower() -- Defining the key if key == "c" then -- making a statement end -- where the function ends
I believe this should be a localscript inside of starterGUI.. Under the statement you can insert anything you want if you wanted to destroy the parent you'd do
script.Parent:Destroy()
And what that does is remove it from your sight. It will happen when you press "c". Now you should know what a function is. You can't necessarily change a script with another script. But what you can do is store a value inside of the player that will change when the GUI is pressed, so you can change the key. Make a statement, then compare it to the value and connect it!