Hi, I have a working sprint script for computers, you press shift and your walk speed becomes 32 instead of 16 and all of that works perfectly, but now I am trying to make a button for MOBILE players that will make your speed 32 when pressed and 16 when pressed again etc etc. Anyway, I made the button successfully but when I press it (While testing it in Emulator mode of course) my walk speed doesn't change so the button is there but it doesn't do anything when pressed. Here is my current script:
local player = game.Players.LocalPlayer
local ContextActionService = game:GetService("ContextActionService")
function onButtonPress()
player.Character.Humanoid.WalkSpeed = 32
end
ContextActionService:BindAction("Sprint", onButtonPress, true, "304")
ContextActionService:SetPosition("Sprint",UDim2.new(0.72,-25,0.20,-25))
ContextActionService:SetImage("Sprint", "http://www.roblox.com/asset/?id=343820594")
It is in a local script in the Starter Gui folder just like it is supposed to, and I turned experimental mode off like you're supposed to so I'm confused about what the problem is. Can anyone help me out?

2 comments
Just change WalkSpeed.Value into WalkSpeed?
Oh, sorry, I already did that I need to edit my script in the question, anyway it didn't work but thanks for trying to help