Very weird, um I’ll try to right a piece of code I would do for sprinting script and you can maybe look over and see if you might of missed anything out of usual in your script, if you can’t then it is something probably with the custom model Local Script
local humanoid = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
local uis = game:GetService("UserInputService")
local Animation = script.Animation -- Where my animation object is
local AnimationLoad = humanoid:LoadAnimation(Animation)
if Input.KeyCode == Enum.KeyCode.W and W <= 2 then
W = W + 1
W = 0
if W == 2 then
if Input.KeyCode == (Enum.KeyCode.A)or (Enum.KeyCode.W)or(Enum.KeyCode.S)or (Enum.KeyCode.D) then
humanoid.WalkSpeed = 24
Thanks for the advice and taking your time to write that code.
Unfortunately this code is not optimal for the situation either.
For one thing, it would be better to use a combination of InputBegan and InputEnded.
Also, if I wanted the server to make the character walk to a position using Humanoid.WalkToPoint then there wouldn’t be any UserInputs and the animation would not play.
This code does something very similar:
Humanoid = script.Parent:WaitForChild('Humanoid')
RunAnim = script.Parent:WaitForChild('Animations'):WaitForChild('RunAnim')
RunAnimTrack = Humanoid:LoadAnimation(RunAnim)
if (speed > 1) then
It can be run as either a server Script or a LocalScript.
The animation plays and replicates when it is a server script.
The animation plays but does not replicate when it is a LocalScript.
This isn’t a good fix either because it overrides the fall animation.
@Scarious It’s an R15 with some parts welded to it. It uses a Humanoid object. The player’s character is set to that specific rig.
I think you should use remote events. It would be too much to explain here but you should watch this video. This video teaches you the basics of remote events, and also includes a tutorial on remote functions.
This might be a bit off of your original question but when you load up into studio you should be able to grab the “Animate” script from the character model in Workspace. This might not be exactly what you’re looking for but if you need an animation played, then it could help you out.