#LOOK THIS ANIM, IT CANT GO BRUH
1 messages · Page 1 of 1 (latest)
The Default animate script never plays the run animation. It only plays the walk animation
So you'd have to change the first Argument of the function playAnimation to "run"
or just change the walk animation id instead
Np
@fresh sapphire i already changed the walk anim
If you want a running animation and a walking animation you first have to make a running mechanic
Humanoid.running just detects if the player moves at all
how can i make this mechanic?
thats why its used for walking as well
The last time I made a running script is quite a while ago so this might not be the best approach. But i remeber that i just detected if the player was pressing shift / ctrl and then i changed their WalkSpeed. And for the animation I just stopped all animations (with the stopAllAnimations function in the default animate script) and changed the walk animationId property.
i need to use input service right?
yea
how can i make my own stopallanims on my code, because idk how to use stopAllAnism functions
i will try
Just read the already existing one
?
Im from germany but what do you mean with "my code print"?
if do you have a print from your shift/ctrl script
and the stopall
@fresh sapphire
what i need to do in this function
** You are now Level 6! **
Sorry i was eating dinner i am back now
Just fire it through a BindableEvent so that it won't play the old walk animation when you want to switch animations
its like a RemoteEvent but it communicates beetwen two scripts of the same kind. Local -> Local or Server -> Server
Ok
I know how to do shift run to animation but idk hoe to stop anim to play the run anim
@fresh sapphire
I can't speak spanish
Did you look into BindableEvents?
Yeah, I watch tutorials videos but I don’t understand
I’m watching a tuturial right now
Bindable is a ever whe can create right?
alr. When your done create a BindableEvent that is connected with your animate Script. And whener the Player presses shift you just fire that bindableEvent to use the stopAllAnimations() function in the animate script
Yes you can create it. It is an instance#
Ok, but why I need stopallanims to play one
Do we have a better form?
How we can stopallanims to play the run and walk anim
Oh yeah and you also need to play the walk animation again using the playAnimation() function
if the animation is already running with the old animationId, changing the animation id won't change the currently running animation
So you have to stop the animation and then play the walking animation again
All this in animate script?
Yeah because the animate script is the only script that has the animation saved that is running
** You are now Level 17! **
We stop like this
Stopallanims = true
If stopallanims == true then
…
no no. stopAllAnimations is a function
How I do that 🧐
Idk because im bad with anims code sorry😞
so like this:
stopAllAnimations()
playAnimation(<animationName>, <transitionTime>, <humanoid>)
You'll learn
But its not only animation code. Functions are very important for all kinds of code
Ok
Yeah I’m learnig
I Will try now
ok
Do I need to delete My serverscript service script?
Why
And how does it look like
I Will print wait a minute Plis
local Players = game:GetService("Players")
local function onCharacterAdded(character)
-- Obter o animador no humanoide
local humanoid = character:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")
-- Parar todas as trilhas de animação
for _, playingTrack in animator:GetPlayingAnimationTracks() do
playingTrack:Stop(0)
end
local animateScript = character:WaitForChild("Animate")
animateScript.walk.WalkAnim.AnimationId = "rbxassetid://71054155356164"
animateScript.run.RunAnim.AnimationId = "rbxassetid://113949475625566"
--animateScript.jump.JumpAnim.AnimationId = "rbxassetid://"
--animateScript.idle.Animation1.AnimationId = "rbxassetid://"
--animateScript.idle.Animation2.AnimationId = "rbxassetid://"
--animateScript.fall.FallAnim.AnimationId = "rbxassetid://"
--animateScript.swim.Swim.AnimationId = "rbxassetid://"
--animateScript.swimidle.SwimIdle.AnimationId = "rbxassetid://"
--animateScript.climb.ClimbAnim.AnimationId = "rbxassetid://"
end
local function onPlayerAdded(player)
player.CharacterAppearanceLoaded:Connect(onCharacterAdded)
end
Players.PlayerAdded:Connect(onPlayerAdded)
nah keep it
ok
and transitionTime is a number so do maybe 0 or 0.1
sorry
its ok
walk or WakAnim
walk
ok