Character Moving Incorrectly After Setting CFrame

So I Was Making An Animation And It Sets The CFrame Of The HumanoidRootPart to The Location Of The Torso 0.01 Seconds Before The Animation Ends, but SOMEHOW, This Happened


This Only Happens When Using WSAD With Shiftlock It Doesn’t Happen, But When I Select The HumanoidRootPart It Just Suddenly Fixes It Self, It Is Rotating Around Like 10 Studs In Front Of The Character

Do you mean the skidding effect of the player? You didn’t really expect what we are supposed to be seeing.

I saw a post a while back about Blender created rigs that had to be resized in Studio and that caused the skidding/sliding. I’m not sure if you are using that kind of rig though.

So I Tried Commenting Out The CFrame And It Still Happened So I Dont Know What Is Causing It

I’m Using The Default Roblox Rig

It Fixed It Self Somehow, I Changed Some Stuff About The Animation, And Now It Works. Idk What Happened

It has returned… i dont know what caused it, i was just porting the tool to a module script, but then it came back

Its Very Weird Because It Dissappears if i select the humanoidrootpart in studio while running it

I’ve Tried To Use Parts That Track The HumanoidRootPats Position, But Its Not Moved Out Of The Character At All

So Uh It Uses Multiple Animations And I Tried Only Using One And This Is What The Code Looks Like (The Glitch Still Happens)

local CF = PlrChar.HumanoidRootPart.CFrame
		local Backflip = PlrChar:FindFirstChildOfClass("Humanoid"):LoadAnimation(script.Parent.Backflip)
		Backflip:Play()
		repeat wait() until Backflip.Length ~= 0
		task.wait(Backflip.Length-Backflip.TimePosition-0.01)
		PlrChar.HumanoidRootPart.CFrame = CF*CFrame.new(0,0,42.2)
		Backflip:Stop()
		PlrChar.HumanoidRootPart.Anchored = false
		PlrChar:FindFirstChildOfClass("Humanoid").AutoRotate = true

The Glitch Happens With The Other Animations Too, Someone Just Please Notice This Topic

somehow, it is caused by the stupid wait().

Does it make a difference if you change your repeat wait() until to repeat task.wait until?

It Is Caused By Changing CFrame While The Animation Is Playing, I Fixed It By Manually Changing The Animation To Be Offset By A Certain Amount And Then Changing The CFrame Before Playing The Animation, Also I Was Using repeat wait() until Only To Find When The Animation Was Done Loading, After That I Use task.wait(AnimTrack.Length-0.01) To Be Able To Run Code Right Before The End. I Had Previously Used That Method To Pause Animation For A Certain Amount Of Time Right Before The End, To Simulate End Lag

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.