When I am holding down the ContextActionService button using the emulator, it does not work. This script is a local script located inside the character.
--//Services\\--
local contextActionService = game:GetService("ContextActionService")
--//Camera\\--
local currentCamera = workspace.CurrentCamera
--//Other\\--
local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")
local statsFolder = character:WaitForChild("Stats")
local statsDinosaur = statsFolder.Dinosaur
local statsActions = statsFolder.Actions
--//Script\\--
local function mobileSprint(inputState)
if statsActions.CanSprint.Value then
if inputState == Enum.UserInputState.Begin then
humanoid.WalkSpeed = statsDinosaur.SprintSpeed.Value
currentCamera.FieldOfView = 75
elseif inputState == Enum.UserInputState.End then
humanoid.WalkSpeed = statsDinosaur.WalkSpeed.Value
currentCamera.FieldOfView = 70
end
end
end
local mobileSprintButton = contextActionService:BindAction("MobileSprintButton", mobileSprint, true, Enum.KeyCode.LeftShift)
contextActionService:SetTitle("MobileSprintButton", "Sprint")
contextActionService:SetPosition("MobileSprintButton", UDim2.new(0, 200, 0, 60))
contextActionService:GetButton("MobileSprintButton").Size = UDim2.new(0, 65, 0, 65)

4 comments
I've never used ContextActionService, but maybe the error is the fourth argument of: local mobileSprintButton = contextActionService:BindAction("MobileSprintButton", mobileSprint, true, Enum.KeyCode.LeftShift)
It has to do something with the UserInputState because before the "if statsActions.CanSprint.Value then" I added a print("test") and it printed "test" in the output.
Add a print(inputState) before the "if statsActions.CanSprint.Value then" and see what happens
Sorry for the 5hr late response, but in the output, it prints "MobileSprintButton."