So you see i have like a button in PC devices where if you click it or your mouse enters the button it toggles to true and so it opens a gui, and if you click again or get your mose inside it, it will toggle to false but in mobile that is not the case, even with a mobile button so what happens is that its just toggling when you are pressing it but if you stop pressing it will toggle false hres the code
script.Parent.MouseButton1Click:Connect(function()
game.Lighting.Camera:FireServer()
end)
local Context = game:GetService("ContextActionService")
local function mobile()
game.Lighting.Camera:FireServer()
end
Context:BindAction("Camera",mobile,true,Enum.KeyCode.ButtonX)
Context:SetPosition("Camera",UDim2.new(0.386, 0,0.674, 0))
that is in a local script, when i do it with desktop devces or with a mouse it works well but in mobile it doesnt work that way and heres the script which detects the serverfired
game.Lighting.Camera.OnServerEvent:Connect(function()
workspace.CamsUp.Value = not workspace.CamsUp.Value
end)
i hope that described well what is my problem

1 comment
i tried that but it still when button is pressed it true but if you stop pressing then its false