ContextActionService Not Firing

Hi everyone, basically I’ve been having trouble for a couple of days with this script.

The idea of it is that a player must be ‘stancing’ (which they can toggle on and off) in order to shoot a fireball. The problem is that Enum.UserInput.MouseButton1 doesn’t trigger the action. When I sub in a key code in place of it, the script works
perfectly.

I checked ingame, and the action does show up under binded actions in the F9 tab.

A weird thing is that, while on the F9 tab (sorry I can’t remember the actual name for it), if I click above the tab then it shots the fireball. I thought maybe that meant that the issue had something to do with priority level, so I messed a little with BindActionWithPriority() and different values, but to no avail.

Any help or suggestions are very much appreciated, thank you!

efouergqebgtq3i54n

st is name of the property changed, which in your case is Value. (See More) Therefore, it is never equal to true, and the action is never binded.

Instead, you should check if stance.Value is true.

Edit: So apparently, .Changed functions differently for Value objects. Intresting. I don’t use them that often, so I apologize.

@ThatTimothy Nah that’s not the problem, I double checked that before posting.

https://developer.roblox.com/en-us/api-reference/event/BoolValue/Changed

If I understand correctly, the parameter is equal to the new bool value.

@ThatTimothy No problem, thank you for trying to help