Geolio9
(Tomate)
April 18, 2021, 4:38pm
1
Hello
What do you want to achieve?
I want to have a gun animation that stays and doesn’t break.
What is the issue?
(sorry for the bad quality)
My animation works for a second, then it points down instead of forward(not part of the animation)
What solutions have you tried so far?
I looked on the developer forums and I couldn’t find anything that fixed the animation.
I removed the default Idle animation and added mine when the gun was equipped.
Thanks in advance,
Geolio9
abrah_m
(abe)
April 18, 2021, 4:40pm
2
Did you try looping the animation in the animatior plugin?
KJry_s
(MalleoZephyris)
April 18, 2021, 4:42pm
3
You can achieve this in code by changing the AnimationTrack
’s property called Looped
to true.
AnimationTrack.Looped = true
So you do not have to reupload your animation.
What you can do is add an animation event at the point in the animation where you want it to stop. (Alternatively you can name the keyframe and use the keyframe reached event).
So it would look something like this :
local track = humanoid:LoadAnimation(anim)
track:GetMarkerReachedSignal("End"):Connect(function()
track:AdjustSpeed(0)
end)
Make sure to name the animation event “End” in this case.
EDIT: Here I’m assuming your animation starts with an idle pose and ends with the gun pointing forward.
What animation priority is the animation. It’s possible Roblox’s default animations are overriding it. I suggest setting the Animation Priority via the editor to “Action”
Wait, ignore this. I misread the OP. Like stated above ensure the animation is set to “Looped” as if it is not it will simply play once and stop.
Geolio9
(Tomate)
April 18, 2021, 5:31pm
7
@abrah_m ,
I haven’t, but the animation is three seconds long, and it stops at like one and half.
I’ll try it, but I don’t think that is the problem.
@rohithsuju12345 ,
I don’t want it to end, I have an event that plays the animation when the gun is equipped.
RatiusRat
(Boopmaster)
April 18, 2021, 5:50pm
8
Is it ethical having a 30 second animation?
Geolio9
(Tomate)
April 18, 2021, 5:52pm
9
I meant three…
Thank you for noticing.
RatiusRat
(Boopmaster)
April 18, 2021, 5:54pm
10
Ah okay (character limits_____)
Geolio9
(Tomate)
April 18, 2021, 5:55pm
11
Thank you, though I am using the default animator in a humanoid, which doesn’t have a looped property, is there any way I can loop it?
RatiusRat
(Boopmaster)
April 18, 2021, 5:55pm
12
I’m sure you can set the animationtrack.Looped to true? It has worked for me many times.
RatiusRat
(Boopmaster)
April 18, 2021, 5:57pm
13
It might be a problem with your animation? Because you stated that it wasn’t intended to be like that. Maybe you could show us your animation?
Geolio9
(Tomate)
April 18, 2021, 5:59pm
14
Okay, I shortened the animation to a second and it worked, and then it stopped, but it lasted a bit longer than normal.
RatiusRat
(Boopmaster)
April 18, 2021, 6:01pm
15
Are you able to screenshot like the animation in the animation plugin?
Geolio9
(Tomate)
April 18, 2021, 6:02pm
16
Could I just link the animation?
Animation: HK416 Animation - Roblox
RatiusRat
(Boopmaster)
April 18, 2021, 6:03pm
17
Sure. (Character limits_______)
Geolio9
(Tomate)
April 18, 2021, 6:05pm
18
Oh my gosh,
The problem is r6, is there any way to convert r15 to r6?
RatiusRat
(Boopmaster)
April 18, 2021, 6:06pm
19
Im afraid not because r6 uses different motor6d’s compared to r15 and they have different names.
But you stated that the animation did work a bit?
Geolio9
(Tomate)
April 18, 2021, 6:07pm
20
Yes, it worked, but I experimented with the game settings, and I didn’t think it would make a difference, my bad.