So im trying to make a button that makes the player sprint for mobile.
Heres my code:
local player = game.Players.LocalPlayer local char = player.Character local mobile = game:GetService("ContextActionService") function sprint() char.Humanoid.WalkSpeed = 35 end end local EnableSprint = mobile:BindAction("MobileSprint",sprint,true,"") mobile:SetPosition("MobileSprint",UDim2.new(0.72,-25,0.20,-25))
It doesnt work because the player doesnt go to its default speed of 16. Any help?