local tabDown = false local input = game:GetService("UserInputService") local player = game.Players.LocalPlayer
input.InputBegan:connect(function(k) local key = k.KeyCode if key == Enum.KeyCode.E then tabDown = true end end)
input.InputEnded:connect(function(k) local key = k.KeyCode if key == Enum.KeyCode.E then tabDown = false end end)
while wait(0.05) do if tabDown then local Event = game:GetService("ReplicatedStorage").Specials.throatslit local A_1 = 2000 Event:FireServer(A_1) end end
Hello, From what i have seen in your LOCALSCRIPT...
I found a few things that could make some nasty problems, so i have written a fresh and new familiar LOCALSCRIPT for you, hopefully, this shall work.
UIS = game:GetService("UserInputService") CHECK = false RUN = false
UIS.InputBegan:Connect(function(INPUT, PROC) if INPUT.KeyCode = Enum.KeyCode.E and not PROC and CHECK == false then
RUN = true CHECK = true wait() end end
UIS.InputBegan:Connect(function(INPUT, PROC) if INPUT.KeyCode = Enum.KeyCode.E and not PROC and CHECK == true then RUN = false CHECK = false wait() end end
while wait(0.05) do
if RUN == true then
local RE = game:GetService(“ReplicatedStorage”).Specials.throatslit
local A_1 = 2000
RE:FireServer(A_1)
end
end