-
What do you want to achieve? I’m trying to create a tool when you only equip it and press F, the player will block.
-
What is the issue? Whenever I equip the tool and press “F” then unequip it afterwards and press “F” again, the script still thinks I’m blocking.
-
What solutions have you tried so far? I’ve only found those that doesn’t use tools for blocking systems.
Local Script
local function onEquip()
equipSound:Play()
toolEquipped = true
idleTrack:Play()
UIS.InputBegan:Connect(function(input, isTyping)
if isTyping then return end
if input.KeyCode == Enum.KeyCode.F then
print("press F")
speed(0, 0)
print("Speed = 0")
--blockAnim:Play()
RS.Blocking:FireServer("On")
end
end)
UIS.InputEnded:Connect(function(input, isTyping)
if isTyping then return end
if input.KeyCode == Enum.KeyCode.F then
speed(16,50)
--blockAnim:Stop()
RS.Blocking:FireServer("Off")
end
end)
end
Thanks!