This is not a request, but I was wondering where would I add a KeyDown function in this function, I am really not sure and would need some help.
Basically when the key, example "e" is pressed it would FireServer()
function onTouched(hit)
local Humanoid = hit.Parent:FindFirstChild("Humanoid")
if not Humanoid then
return;
end
if not script.Parent:WaitForChild("ButtonEvent") then
script.Parent:Destroy()
return;
end
script.Parent.ButtonEvent:FireServer()
end
script.Parent.Touched:connect(debounce(onTouched))
