I've made a script for xbox controls by just using keydown, but it does not work it gives me the error of: "Keydown is not a valid member of ControllerService", please help?
local player = game.Players.LocalPlayer
repeat wait() until player.Character.Humanoid
local humanoid = player.Character.Humanoid
local mouse = player:GetMouse()
local XboxButton = game:GetService("ControllerService")
XboxButton.KeyDown:connect(function(key)
if key == "x" then
game.Players.LocalPlayer.Character:WaitForChild("Humanoid").Health = 0
end
end)
