How can i put a animation sprint id with my script?

Hello guys ! I would like that when a person is on mobile there is a button gui which appears in its screen and when it clicks there is an animation of sprint id which launches.

here is the script

local button = script.Parent
local Player = game:GetService('Players')
local sprinting = false

local function sprint()
     local player = Player.LocalPlayer
     if sprinting then
         sprinting = false
         button.Text = 'Sprint: On'
         player.Character.Humanoid.WalkSpeed = 50
     else
        sprinting = true
        button.Text = 'Sprint: Off'
        player.Character.Humanoid.WalkSpeed = 16
     end
end

button.MouseButton1Click:Connect(sprint)
2 Likes