So when a certain button on your keyboard is pressed I want it to run a certain script. In this case I am making a game where when you press a button on your keyboard it will run the script below it. I already have the script below it typed so all I need is the first line.
alert "CheckeredDev" + " is awesome but needs help scripting xD!";
This might not be what you mean but here:
Make sure API services are enabled
local UserInputService = game:GetService("UserInputService") local Key = 'Z' -- change 'Z' to the key you want to press UserInputService.InputBegan:Connect(function(Input, IsTyping) if IsTyping then return end if Input.KeyCode == Enum.KeyCode[Key] then --script here end end)
Closed as Not Constructive by hiimgoodpack and royaltoe
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?