I’ve been using ContextActionService for a while now, but I don’t know how to tell if someone is holding it down.
How would I do this?
Current code:
local mobileFiring = false
game:GetService("RunService").RenderStepped:Connect(function(deltaTime)
if equipped == true then
engine:update(deltaTime)
end
end)
function mobileReload()
engine:reload()
end
function mobileFire()
engine:fire()
end
function UnbindFire()
engine:stopFiring()
end
if mobileFiring == false then
local FireButtonBind = ContextActionService:BindAction("Engine Fire", mobileFire, true, "")
mobileFiring = true
else
local FireButtonUnbind = ContextActionService:BindAction("Engine Fire", UnbindFire, true, "")
mobileFiring = true
end
I’m trying to make a mobile fire button like in bad business or arsenal
