i have a script that detects if the player pressed the “e” key while a value is true, any idea why it dosn’t work?
local UIS = game:GetService("UserInputService")
local Character = game.Players.LocalPlayer.Character
local Grabvalue = game.Players.LocalPlayer.PlayerStuff.Grabbed.Value
debounce = true
UIS.InputBegan:Connect(function(input,busy)
if busy then return end
if input.KeyCode == Enum.KeyCode.E and Grabvalue == true then
print("ahh")
end
end)
Because of this. It will only run once as a value.
local UIS = game:GetService("UserInputService")
local Character = game.Players.LocalPlayer.Character
local Grabvalue = game.Players.LocalPlayer.PlayerStuff.Grabbed
debounce = true
UIS.InputBegan:Connect(function(input,busy)
if busy then return end
if input.KeyCode == Enum.KeyCode.E and Grabvalue.Value == true then
print(" ")
end
end)