local UserInputService = game:GetService("UserInputService")
local player = game.Players.LocalPlayer
UserInputService.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.W or Enum.KeyCode.A or Enum.KeyCode.S or Enum.KeyCode.D then
player.PlayerGui.Pressed.Frame.BackgroundColor3 = Color3.fromRGB(16, 255, 16)
end
end)
UserInputService.InputEnded:Connect(function(input)
if input.KeyCode == Enum.KeyCode.W or Enum.KeyCode.A or Enum.KeyCode.S or Enum.KeyCode.D then
player.PlayerGui.Pressed.Frame.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
end
end)
how do I make it so it only changes the background when these keys are pressed because for some reason it changes it no matter what key is pressed.

1 comment
Thaks a lot for helping :D