#I can't figure out how to play an animation.
94 messages · Page 1 of 1 (latest)
there is a property of player
that is.Character
so
game.Players.LocalPlayer.Character
using character gives you acess to the actual player character
oh. my god. so I literally just needed to add a .Character.
well, thank you for the help! it's working now.
I can't believe I was that close to doing it on my own.
🎉 yay
@low badge hey sorry for ping but
do you know how to anim model?
Animate model?
there video
so i already have animation for model but in game it doesnt work only my animation character work
anyone know how to fix this?
how are the wings on the character? are they inside the player model
no i use script for it
honestly idk how to animate assecories
ea
When In doubt go to YouTube
yo rq mind helping me with something else..? I can't figure out how to stop the animation now.
here's the code, too
that's what I've been trying to use already
so store the animation by already loading it
I've also tried putting it under the else
lemme write rq
local humanoid:Humanoid = game.Players.LocalPlayer
local animiation = humanoid:loadAnimation()
script.Parent.MouseButton1Click:Connect(function()
if animiation.IsPlaying == false then
animiation:Play()
else
animiation:Stop()
end
end)
so you load the animation already
and you can check if the animation is playing
I'm struggling to understand. what am I doing wrong here?
** You are now Level 1! **
we get the humanoid outside the function
we load the animation
but dont play it
until the function is called
I did also try that but I don't think that worked either
so when MouseButton1Click
I'll try it again though
if I got what you said correctly, shouldn't this work?
because it won't play the animation at all like this.
does it play only once? use .Looped = true
it should already play basically looped, because whenever it HAS been playing, it just won't stop at all.
it's not working
so the anim plays but doesnt stop?
no, like, putting the loading animation thing outside of the function just removes the ability to play the animation at all.
it just doesn't play like that.
thats strange
I'm pretty sure with this, it would play but not stop.
basically what I'm thinking.
i made a bit that should stop all anims
for _, i:AnimationTrack in ipairs(humanoid:GetPlayingAnimationTracks()) do
i:Stop()
end
what it does is
- get playing animation tracks
- stop them all
put it after the else
alr, I'll try that
** You are now Level 2! **
nope.
I think the error is probably in the if statement, it seems like it just.... doesn't run the else part or something.
yea definetly
the question though is why
i would replace it with a boolean and set it to true or false
since it doesnt work
local isplaying = false
if isplaying == false then -- yea
end
yep
still not working