#HELP PLS

5 messages · Page 1 of 1 (latest)

limber tree
#

guys I need help when I press the key it doesn't work

User
-- Obtém o serviço UserInputService
local userInputService = game:GetService("UserInputService")

-- Função a ser executada quando uma tecla é pressionada
local function onKeyDown(input, gameProcessedEvent)
-- Verifica se a tecla pressionada é a tecla "Q"
if input.KeyCode == Enum.KeyCode.Q then

workspace.LieDetector.Color = Color3.fromRGB(255, 38, 0)
end

end

-- Conecta a função ao evento InputBegan
userInputService.InputBegan:Connect(onKeyDown)

languid prawn
#

what are you trying to do excatly?

#

changing color of a part?

#

if yes then here is the code
local part = game.workspace.Part
local uis = game:GetService("UserInputService")
uis.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.Q then
part.BrickColor = BrickColor.Random()
end)

dusky steepleBOT
#

studio** You are now Level 5! **studio