So I’m making a custom walk and run animation, what I’ve done is I’ve set the default run animation on Roblox to my custom walk animation because on default walk Roblox uses the default run animation. I also wanted to create a run script with the shift that played a custom animation and so I did, but the issue is that right now it only replicates for the user who is performing it, the person who is watching the player run is just watching him walk fast. Here is the code:
local UIS = game:GetService('UserInputService')
local Player = game.Players.LocalPlayer
local Character = script.Parent
local Camera = workspace.Camera
local Sound = Character.HumanoidRootPart
UIS.InputBegan:connect(function(input)
if input.KeyCode == Enum.KeyCode.LeftShift then
Sound.Running.PlaybackSpeed = 1.85
Camera.FieldOfView = 80
Character.Humanoid.WalkSpeed = 18
local Anim = Character.Animate.walk.WalkAnim
Anim.AnimationId = 'rbxassetid://5972071430'
PlayAnim = Character.Humanoid.Animator:LoadAnimation(Anim)
PlayAnim:Play()
end
end)
UIS.InputEnded:connect(function(input)
if input.KeyCode == Enum.KeyCode.LeftShift then
Sound.Running.PlaybackSpeed = 1.4
Camera.FieldOfView = 70
Character.Humanoid.WalkSpeed = 14
PlayAnim:Stop()
end
end)