You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
i wan’t a custom running animation
What is the issue? Include screenshots / videos if possible!
running animation got way too fast as walkspeed got faster.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
no solutions related to this…
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
here’s the script i’m using:
local animateScript = character:WaitForChild("Animate")
animateScript.run.RunAnim.AnimationId = runAnimationId
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
AnimationSpeed is not a valid member of Animator "Workspace.yousef_mash1.Humanoid.Animator"
i only used this:
local function updateAnimationSpeed(humanoid,animator)
local walkSpeed = humanoid.WalkSpeed
local animationSpeed = walkSpeed / 16
--16 is the adjustment factor. It may need tweaking
--may want to try and stick with multiples, added 4 added 8 added 16
animator.AnimationSpeed = animationSpeed
end
local animator = humanoid:WaitForChild("Animator")
updateAnimationSpeed(humanoid,animator)
I don’t seem to be on the right track here … I’m sorry.
How did you get that to act like that in the 1st place … is that a very small player?
If it is … that should be about … WalkSpeed=4.8 … guessing by how fast the video is moving.
Either way lowing the WalkSpeed is what it looks like needs to be changed.
default walk speed is 16 … 1/2 the player size is would be 8 … 1/4 would be 4 … kind of like that.
Yo,
You can just change the speed of an animation by
Animation:AdjustSpeed(CurrentWalkspeed/16)
I’m guessing you changed the id the animate script in your character
The animator instance is only meant for loading animation tracks and you don’t need to use WaitForChild for the animator global variable and instead use FindFirstChildOfClass(“Animator”) cause WaitForChild function yeilds the script for a mili second and only is used for instances that are loading.
The only time you can change the animation track is when you get the animation variable and then change the speed after by using (AnimationTrack:AdjustSpeed(number))
Example:
local player = game:GetService(“Players”).LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:FindFirstChildOfClass(“Humanoid”)
local animator = character:FindFirstChildOfClass(“Animator”)
local AnimationTrack = animator:LoadAnimation(script:WaitForChild(“AnimationTrack”))
AnimationTrack:Play() – You can adjust speed after the animation has been loaded
AnimationTrack:AdjustSpeed(1) :Number
Another note: is that the whole script? where is the part where you load the animation in via script?
the problem is that this is not an animation track, its overriding roblox default running animation with an animateScript:
local animateScript = character:WaitForChild("Animate")
animateScript.run.RunAnim.AnimationId = runAnimationId
meaning this already loaded, where and how do i put AdjustSpeed like this?
lets say you can’t adjust the speed of the animateScript, is there any reliable to detect if the player move’s or stops so i can instead load runanimationid and play it/stop it and use the AdjustSpeed method on it?
I see what you’re doing now. The only way to change speed without loading it in the script. You would have to use GetPlayingAnimationTracks() in the animator to loop every animation that is currently playing in the character.
The animation.Length condition is only meant for it to fully load to enable, so we can change the speed without error!