So basically on my end, while testing the PC and XBOX controls. The PC controls work perfectly fine but when pushing the button on the other hand the function likes to repeat which has left me confused so I've thought about using a wait() and a while loop that triggers a bool value I just don't know how to execute it.
local player = game.Players.LocalPlayer
local inputServ = game:GetService("UserInputService")
local Key = Enum.KeyCode.E
local Button = Enum.KeyCode.ButtonX
inputServ.InputBegan:connect(function(input)
if input.KeyCode == Key then
print("PC Pressed")
script.Activated:FireServer()
end
inputServ.InputBegan:connect(function(input)
if input.KeyCode == Button then
print("XBOX Pressed")
script.Activated:FireServer()
end
end)
end)
