so im trying to make it where if your swords not equipped then you cant use it
for some reason even though i told it to return the remote event is still firing and i don’t know why
i haven’t tried to much of fix it but that’s because i don’t know how and its not making sense
any help would be appreciated
here is the code
local rp = game:GetService("ReplicatedStorage")
local remotes = rp:WaitForChild("Remotes")
local combatRemote = remotes:WaitForChild("Combat")
local BlockRemote = remotes:WaitForChild("Block")
COOLDOWN_Time = false
local player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://18339887000"
local animationTrack = humanoid:LoadAnimation(animation)
local char = player.Character or player.CharacterAdded:Wait()
local tools = player.Backpack:GetChildren()
uis.InputBegan:Connect(function(input,isTyping)
if isTyping then return end
if player.Character:FindFirstChildOfClass("Tool") or player.Character:FindFirstChildOfClass("Katana") then return end
if input.UserInputType == Enum.UserInputType.MouseButton1 then
local jumping = uis:IsKeyDown(Enum.KeyCode.Space)
combatRemote:FireServer(jumping)
end
if input.KeyCode == Enum.KeyCode.F then
BlockRemote:FireServer(true)
end
end)
uis.InputEnded:Connect(function(input)
if input.KeyCode == Enum.KeyCode.F then
BlockRemote:FireServer(false)
end
end)```