So, like, I want to stop the animations of my legs after a bit so I can have the walk animation.
What forces the animation to load?
? I don’t understand. I realized I need to explain it better anyways, but how do I remove keyframes after a certain time?
You mean stop the animation? You will probably need a local that loads the anim and only then :Play()
/:Stop()
it. You can put a wait(3)
so it stops the animation after 3 seconds
And if you mean removing keyframes, that’s impossible to do it in-game i believe
No, only removing the key frame effects on the legs midway to have the default walking animation so that the legs doesn’t freeze when I’m moving about.
I can always edit the animation if it can’t be done in script.
Can i see the script if you have it?
local UIS = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
repeat wait() until Player.Character
local Character = Player.Character
local Human = Character.Humanoid
local Animations = game.ReplicatedStorage.Animations
local FireBreath = Human:LoadAnimation(Animations["Fire Breath"])
FireBreath.Priority = Enum.AnimationPriority.Idle
local FBBool = false
UIS.InputBegan:Connect(function(Input, YESYESYES)
if not YESYESYES then
if Input.UserInputType == Enum.UserInputType.Keyboard then
local Code = Input.KeyCode
local E = Enum.KeyCode
if Code == E.Q and not FBBool then
Human.WalkSpeed = 2
FBBool = true
FireBreath:Play()
local Tick = 0
repeat
wait()
Tick+=1
if not FBBool then break end
until Tick == 36
if FBBool then
-- I want to remove the keyframes on the legs here
FireBreath:AdjustSpeed(0)
Human.WalkSpeed = 14
end
end
end
end
end)
UIS.InputEnded:Connect(function(Input, YESYESYES)
if not YESYESYES then
if Input.UserInputType == Enum.UserInputType.Keyboard then
local Code = Input.KeyCode
local E = Enum.KeyCode
if Code == E.Q and FBBool then
FBBool = false
FireBreath:Stop()
Human.WalkSpeed = 16
end
end
end
end)
You can connect to stepped and overwrite the transform value!
local legWeld = ... -- get the leg weld
local conn = RunService.Stepped:Connect(function()
legWeld.Transform = CFrame.new()
end)
delay(1, function()
conn:Disconnect()
end)
Try doing
FireBreath:Stop()
Thanks, I’m assuming this is what I need. I’ll “unsolution” if it didn’t work
That stops the animation, not disconnecting the legs on the animation.
Sorry, didn’t understand what you actually needed
Can I get the source of this or a bit of an explanation on how it works?
What you’re telling me is how to stop the animation as a whole. What I asked for is how to stop an animation only for the legs
this will just overwrite the animation’s transform value. It’s kinda a hack.
You need to get the leg weld. It’s probably Character.LeftLeg.LeftHipJoint or something. You’ll want to do this for each joint.
So, I’d need a for loop to get the joints of the legs, since it’s in R15 (I would’ve preferred R6, but noo, he wanted it extra fancy)
Also, what does the Delay do? I’d like to know just incase I mess something up.
Oh, that just says after 1 second, disconnect the loop.
You’ll want to disconnect it once you’re done ovewriting it.
Note this can be kinda expensive to overwrite this, and you’ll need to do this on the client, .Transform doesn’t replicate.
So how exactly does it work? does it fire every tick?