I've encountered an extremely odd issue with my code. For some reason, my code is being executed despite conditions I've put in. Below is some sample code that demonstrates my issue (Local script)
game:GetService("UserInputService").InputBegan:connect(function(input,gp)
local f = true
if f == true then
f = false
print("I can eat peanut butter")
end
end)
Despite the conditions placed inside the if statement and the fact that variable f turns to false, the script still prints "I can eat peanut butter" no matter what. It is extremely odd. If anyone has any info about this or know how to deal with it, please comment.

2 comments
What is the gp parameter supposed to be equal to?
gp is game processed. If the input is being processed by the game (like chatting)