I have a tester on an Apple iPad device. When the user picks up a railgun or sniper rifle, a Z button appears on their screen. When they press the Z button, the zoom scope show up as it’s supposed to. However, the Z+ and Z- buttons don’t show up. I have set the scope mask Z-index to -16384 along with its containing frame and the problem persists. Below are screenshots from both an iPad and a Kindle Fire.
First, the iPad screenshots.
Now the Amazon Kindle Fire screenshot.
Now I had the tester type /console into the chat to pull up the developer console to see if there was any errors. This is what they are seeing:
The messages look to me like they are some kind of informational messages about thread activity. Beyond that I have no idea.
Now, I have removed the sniper scope mask and had the tester try it again. The buttons appear and disappear like they are supposed to when entering and exiting zoom mode. See the screenshot below.
So the Z+ and Z- button are there as well as the Z and R buttons. As I mentioned before, I set the Z-Index of both the frame and the graphic overlay to -16384. So does anyone have any idea why the buttons are being covered up on an iPad?
EDIT 9/21/2022 @ 1605 PDT
It might help if I include the zoom enable code. This code executes on the client in a client only module script.
-- Turns on the gun scope zoom. Sets up the zoom and -- all keybindings, button, touch, and mouse events. local function zoomIn(localPlayer, toolData, toolInstance) localPlayer.CameraMode = Enum.CameraMode.LockFirstPerson workspace.CurrentCamera.FieldOfView = toolData.zoom.fieldOfView localPlayer.Character.Humanoid.CameraOffset = Vector3.new(0, 0, 4) --enableZoomGui() toolData.zoom.current = toolData.zoom.fieldOfView -- Hide the weapon from view hideWeapon(toolInstance) -- There can be any number of different inputs, but the -- code to handle them all is the same. -- This will be used by touch screens to set -- button locations for ContextActionService. local screenSize = workspace.CurrentCamera.ViewportSize -- Set keyboard hotkeys and gamepad buttons for variable zoom CAS:BindAction("ScopeZoomIn", zoomScope, true, Enum.KeyCode.RightBracket, Enum.KeyCode.ButtonL1) CAS:SetTitle("ScopeZoomIn", "Z+") CAS:SetPosition("ScopeZoomIn", UDim2.new(1, -60, 0, -95)) CAS:BindAction("ScopeZoomOut", zoomScope, true, Enum.KeyCode.LeftBracket, Enum.KeyCode.ButtonR1) CAS:SetTitle("ScopeZoomOut", "Z-") CAS:SetPosition("ScopeZoomOut", UDim2.new(1, -60, 0, -45)) -- Use mouse wheel for variable zoom if there's a mouse. local mouse = localPlayer:GetMouse() if mouse and mouse ~= nil then -- Zoom In toolData.zoom.mouseWheelForward = mouse.WheelForward:Connect(function() zoomScopeIn(3) end) -- Zoom Out toolData.zoom.mouseWheelBackward = mouse.WheelBackward:Connect(function() zoomScopeOut(3) end) end -- Touch enabled displays (mostly phones and tablets) if UIS.TouchEnabled then toolData.zoom.touchPinch = UIS.TouchPinch:Connect(function(position, scale, velocity, state, gameProcessedEvent) print(scale, velocity, state) end) end end