My character seems to have strange movement after I cframe them up and back down again.
The reason why I need to cframe them up is to have a background in the attack without having it appear in front of everyone. Notably, whenever I delete the weapon welded to the character, or anything in the weapon, this problem fixes it.
I’ve tried using PivotTo, I’ve also tried lowering the amount they’ve been set up. I’ve tried resetting the RootJoint’s C0. I’ve also tried deleting the weapon and rewelding a copy of it (But it breaks the character still.)
It also ONLY happens to the attacker, and not the person being hit.
It is incredibly inconsistent on when it happens.
Heres the general rundown of the code.
local orgcf = CFrame.new(0,0,0)
orgcf = char.HumanoidRootPart.CFrame
local orgcf2 = CFrame.new(0,0,0)
orgcf2 = clashable.HumanoidRootPart.CFrame
char.HumanoidRootPart.Anchored = true
clashable.HumanoidRootPart.Anchored = true
char.Humanoid.AutoRotate = false
clashable.Humanoid.AutoRotate = false
char.HumanoidRootPart.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0,500,0)
local instantland = game.ReplicatedStorage.Characters["YiSang"].EGO["CrowsEyeView"].Effects["BackGroundCS"]:Clone()
instantland.Parent = game.Workspace
instantland:PivotTo(char.HumanoidRootPart.CFrame)
game.Debris:AddItem(instantland,9)
char.HumanoidRootPart.CFrame = instantland.Pos1.CFrame
clashable.HumanoidRootPart.CFrame = instantland.Pos2.CFrame
wait(0)
local anim = char.Humanoid:LoadAnimation(script.Skill1)
anim:Play(0)
wait(9)
anim:Stop(0)
char.HumanoidRootPart.CFrame = orgcf
char.HumanoidRootPart.Anchored = false
clashable.HumanoidRootPart.Anchored = false
clashable.HumanoidRootPart.CFrame = orgcf2
char.Humanoid.AutoRotate = true
clashable.Humanoid.AutoRotate = true
Char is character 1 (The one that is affected)
Clashable is character 2 (The one that is being hit.)
Pos1 and Pos2 are preset parts to move the Characters to in the background.