I'm trying to make it so that if a player presses 'Q' then their avatar's properties would be manipulated, and if they were to press Q again then they would be reverted back to the original state. I'm doing this with a StringValue in ReplicatedStorage.

UserInputService.InputBegan:Connect(function(Input, IsTyping)
 if IsTyping then return end
if Input.KeyCode == Enum.KeyCode[key]and Debounce == true then
	Debounce = false
	wait(1.5)
	
	if game.ReplicatedStorage.GearSecondStatus.Value == "GearSecond" then
		print("Switching from Gear Second to Base!")
		GearSecondOnOff(BaseColor,BaseSteam,BaseFace,BaseSpeed,BaseJumpPower)
		game.ReplicatedStorage.GearSecondStatus.Value = "Base"
		
	elseif game.ReplicatedStorage.GearSecondStatus.Value == "Base" then
		print("Switching from Base to Gear Second")
 GearSecondOnOff(GearSecondColor,GearSecondSteam,GearSecondFace,GearSecondSpeed,GearSecondJumpPower)
		game.ReplicatedStorage.GearSecondStatus.Value = "GearSecond"
	end
	
	

end
end)

Just an excerpt of the code. All the parameters in the function are variables that I defined before the excerpt. The String Value's value is 'Base' by default so the game skips over the first if statement because the value hasn't been changed to 'GearSecond' yet (which is intended). The elseif statement works perfectly in game, I get the message in the Output, The StringValue's value is changed to 'GearSecond' and the character's properties are manipulated. The problem is that when I press Q again, the first if statement doesn't register despite its condition being true since the script had previously changed the Value to "GearSecond" (I checked ingame and the value did get changed) anyone know the problem?