Mobile shoot button locks camera

  1. What do you want to achieve? Hello, i want the camera to be able to be moved while shooting on mobile.

  2. What is the issue? I use the ContextActionService to make mobile buttons, but when i press it and try to move my camera, it dosen’t.

This are the current mobile functions:

Connections["MOBILE_FIRE"] = function(actionName, inputState, inputObject)
			print(inputState)
			if inputState == Enum.UserInputState.Begin then
				Shooting = true
				MobileShootAim = true
			elseif inputState == Enum.UserInputState.Cancel then
				Shooting = false
				MobileShootAim = false
			end
			
			return Enum.ContextActionResult.Pass
		end
		
		Connections["MOBILE_AIM"] = function(actionName, inputState, inputObject)
			--print(inputState)
			if inputState == Enum.UserInputState.Begin then
				print(MobileShootAim)
				if MobileShootAim == false then
					if Aiming == false then
						Connections["AIM"](true)
					else
						Connections["AIM"](false)
					end
				end
			end
			
			return Enum.ContextActionResult.Pass
		end
		
		ContextActionService:BindAction("MOBILE_AIM", Connections["MOBILE_AIM"], true)
		ContextActionService:BindAction("MOBILE_FIRE", Connections["MOBILE_FIRE"], true)
		ContextActionService:SetTitle("MOBILE_AIM", "Aim")
		ContextActionService:SetTitle("MOBILE_FIRE", "Fire")
		ContextActionService:SetPosition("MOBILE_AIM", UDim2.new(0, 110, 0, 20))
		ContextActionService:SetPosition("MOBILE_FIRE", UDim2.new(0, 40, 0, 60))
  1. What solutions have you tried so far? I tried doing return Enum.ContextActionResult.Pass at the end of my shoot function but it dosen’t work.
1 Like

I still have the issue, i still need help

Can you move the camera when your thumb is not on the MOBILE_FIRE button?

Yes i can move the camera when i don’t press the button