]]
-- // Get Player Stuff
local Player = game:GetService("Players").LocalPlayer
local Mouse = Player:GetMouse()
local Character = Player.Character
local Humanoid = Character:WaitForChild("Humanoid", 3)
local IsSprinting = false
--/// Get Service
local Camera = game:GetService("Workspace").CurrentCamera
local ContextActionService = game:GetService("ContextActionService")
local TweenService = game:GetService("TweenService")
local RunService = game:GetService("RunService")
-- // Settings
local SprintSpeed = 28 -- Sprinting Speed
local DefaultSpeed = 16 -- Default Speed
local SprintFOV = 90 -- Max: 120
--// Animations
local runAnim = script.Animation
local runTrack = Humanoid.Animator:LoadAnimation(runAnim)
--// Functions
local function SprintFov(Value : boolean)
local Tweeninfo = TweenInfo.new(
0.5,
Enum.EasingStyle.Linear
)
if Value then
TweenService:Create(Camera, Tweeninfo, {FieldOfView = SprintFOV}):Play()
else
TweenService:Create(Camera, Tweeninfo, {FieldOfView = 70}):Play()
end
end
-- // Sets Player Speed When Its Holding Shift, Also Creates A Action For Mobile Players To Sprint.
ContextActionService:BindAction("Sprint", function(_, inputState)
if inputState == Enum.UserInputState.Begin then
Humanoid.WalkSpeed = SprintSpeed
IsSprinting = true
else
Humanoid.WalkSpeed = DefaultSpeed
IsSprinting = false
end
end, true, Enum.KeyCode.LeftShift)
ContextActionService:SetTitle("Sprint","Sprint")
ContextActionService:SetPosition("Sprint", UDim2.new(1, -70, 0, 10))
-- // Main
RunService.RenderStepped:Connect(function() -- Loop Checks
if IsSprinting and Humanoid.MoveDirection.Magnitude > 0 then
SprintFov(true)
runTrack:Play()
else
SprintFov(false)
runTrack:Stop()
end
end)```
#Run animation not playing correctly
11 messages · Page 1 of 1 (latest)
Animation duration?
Playback speed of the animation?
Animation looping?
By these I mean in the animation itself
@ember crater
Animation is 0.30 seconds, Animation is looped and the animation priority is Movement
I solved it now nvm. I just got a new script instead
uh
my script?
where did you find that
.
** You are now Level 7! **
i made that thing as a joke and ppl r using lmaoo