I have provided a clip, it is dark as my game is dark but it should visualise the flashlight easier all be it there is an sfx.
Clip:
The one thing that confuses me is context actions.
For some stupid reason certain keys execute this:
game.ContextActionService:BindAction("Flashlight_Toggle", ToggleFlashlight, true, Enum.KeyCode.E)
game.ContextActionService:SetPosition("Flashlight_Toggle", UDim2.new(0.2, 105,0.2, 0))
game.ContextActionService:SetTitle("Flashlight_Toggle", "Off")
So for example my cmdr config which is Cmdr:SetActivationKeys({ Enum.KeyCode.F2 }) will toggle the flashlight.
Nothing else uses this action or action name and its confusing the hell out of me.
Please note I bearly use context action service. So please bare with me.
I am sure nothing else is having the key being registerd as an input. I dont think there is anything else I could say.
Expected behavior
-
When pressing F2 it should only open cmdr but it also toggles the flashlight.
-
Pressing E should be the only thing that invokes the flashlight toggle however pressing F2 (which opens cmdr) also toggles the flashlight.