Hello,
Whenever I use BindAction to a function, the function plays and doesn't stop.
Here is the code I am using:
local function toolActivated(actionName, inputState, inputObject)
currentModule = require(script[inputObject.KeyCode.Name])
currentModule.Weld(currentFoot)
currentModule.TouchedEvent(currentFoot)
end
CAS:BindAction('Fire', toolActivated, false, mousebutton1, 'q', 'e', 'r', 't', 'y', 'f', 'g', 'h', 'z', 'x', 'c', 'v', 'b', 'n')
When I press one of the buttons that triggers the function, the "TouchedEvent" will play continuously. The touched event is basically a touched function.
(____.Parent.Touched:connect(function()) etc.)
However, the goal is that I only want to play the touched function ONCE when the bindaction is triggered.
I've tried to think about booleans and a way to unbind the action but I just cannot get my head around it.
I'm curious to find out methods to solving this that any of you may have and I appreciate any help.

1 comment
read my answers comments