I want to make it so that when you press R while typing, the run script does not activate.
local Player = game.Players.LocalPlayer
local mouse = Player:GetMouse()
local origSpeed = 16
local character = Player.Character
local humanoid = character.Humanoid
game:GetService('UserInputService').InputBegan:Connect(function(input, process)
if input.UserInputType == Enum.UserInputType.Keyboard then
if input.KeyCode == Enum.KeyCode.R and Player and character and humanoid.WalkSpeed == origSpeed then
Player.Character.RUNSCRIPT.SPEED.Disabled = false
Player.Character.Anima.Disabled = true
Player.Character.RUNANIMATION.Disabled = false
elseif input.KeyCode == Enum.KeyCode.R and humanoid.WalkSpeed == Player.Character.RUNSCRIPT.RunSpeed.Value then
humanoid.WalkSpeed = origSpeed
Player.Character.RUNSCRIPT.SPEED.Disabled = true
Player.Character.RUNANIMATION.Disabled = true
Player.Character.Anima.Disabled = false
end
end
end)

1 comment
In your line 8, put 'and not process' after .Keyboard