i ahve this issue that my input began still fires when player is typing in the chat
here the script:
local UIS = game:GetService("UserInputService")
local abilityss, specity = require(game.ReplicatedFirst.ListOfEverythingForMoves_Ability), require(game.ReplicatedFirst.ListOfEverythingForMoves_Spec)
local player = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()
local abilidtycode, speccode = player:WaitForChild("Data").Stand, player:WaitForChild("Data").Spec
local keymoves = require(game.ReplicatedFirst.MOVES).Movess
local Char = player.Character
local checked = require(player.Backpack.Setup:WaitForChild("valuescontrols"))
local remote = script.Parent.Remotes.Move_Spec
local remote2 = script.Parent.Remotes.Move_Ability
local function startInput(Input, d, t)
if Input and Input ~= t then
if d == "spec" then
local standName = specity[speccode.Value];
local StandMoveset = keymoves[standName]
if not StandMoveset then return end
local MoveName = StandMoveset[Input]
if not MoveName then return end
if checked.canattackb(player) then return end
remote:FireServer(Input, true)
elseif d == "ability" then
local standName = abilityss[abilidtycode.Value];
local StandMoveset = keymoves[standName]
if not StandMoveset then return end
local MoveName = StandMoveset[Input]
if not MoveName then return end
if checked.canattackb(player) then return end
remote2:FireServer(Input, true)
end
end
end
local function Endinput(Input, d)
if d == "spec" then
local standName = specity[speccode.Value];
local StandMoveset = keymoves[standName]
if not StandMoveset then return end
local MoveName = StandMoveset[Input]
if not MoveName then return end
if checked.canattackb(player) then return end
remote:FireServer(Input, false)
elseif d == "ability" then
local standName = abilityss[abilidtycode.Value];
local StandMoveset = keymoves[standName]
if not StandMoveset then return end
local MoveName = StandMoveset[Input]
if not MoveName then return end
if checked.canattackb(player) then return end
remote2:FireServer(Input, false)
end
end
UIS.InputBegan:Connect(function(input, proccessed)
if (not proccessed) then
input = input.KeyCode.Name
task.spawn(function()
startInput(input, "ability", proccessed)
end)
end
end)
UIS.InputEnded:Connect(function(input)
input = input.KeyCode.Name
task.spawn(function()
Endinput(input, "ability")
end)
end)
is on client side btw