Animation arm is broken when played in game and is fine in the editor

  1. I would like to figure out why my animation’s arm is bugged

heres whats happening:
2.


heres whats supposed to happen:

3.I’ve tried looking up videos, using the dev forum, asking for help on discord servers, and tried figuring it out on my own but to no use

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

--Main Script
local db = false



script.Parent.Raycast.OnServerEvent:Connect(function(plr)

	local hum = plr.Character.Humanoid
	while wait() do
	local Origin = plr.Character.HumanoidRootPart.Position
	local Direction = plr.Character.HumanoidRootPart.CFrame.LookVector * 20
		
	local parmasaen = RaycastParams.new()
	local raycast = workspace:Raycast(Origin,Direction,parmasaen)

	
		--print(raycast)
		if raycast then
			if raycast.Instance.Name == "Torso" or raycast.Instance.Name == "HumanoidRootPart" and db == false then
				 db = true
				print(plr.Character.HumanoidRootPart.Position.Magnitude - raycast.Instance.Position.Magnitude)
				local vec1 = Vector3.new(raycast.Instance.Position.X ,3,raycast.Instance.Position.Z +6.1)
				if (plr.Character.HumanoidRootPart.Position.Magnitude - raycast.Instance.Position.Magnitude) >= 3 and (plr.Character.HumanoidRootPart.Position.Magnitude - raycast.Instance.Position.Magnitude)<= 5 then
					plr.Character.Humanoid:MoveTo(vec1)
					plr.Character.Humanoid.MoveToFinished:Wait()
					script.Parent.IsKilling.Value = true
					
					
					plr.Character.HumanoidRootPart.Orientation = raycast.Instance.Orientation
					plr.Character.HumanoidRootPart.Anchored = true
					plr.Character.HumanoidRootPart.Position = vec1
					local clonedAnimStab = game.ReplicatedStorage.KnifeGloryKill3MagnitudeAnims.BackStabba["Killer/MarioStab"]:Clone()
					local clonedVictimBackStab = game.ReplicatedStorage.KnifeGloryKill3MagnitudeAnims.BackStabba.Victim:Clone()
					clonedAnimStab.Parent = plr.Character
					clonedVictimBackStab.Parent = workspace
					local animhumStab = hum:LoadAnimation(clonedAnimStab)
					local animhumVictim = raycast.Instance.Parent.Humanoid:LoadAnimation(clonedVictimBackStab)
					
					animhumStab:Play()
					animhumVictim:Play()
					--wait(1)
					--animhumStab:AdjustSpeed(0)
					--plr.Character["Right Arm"].Orientation = Vector3.new(75.65, 21.724, 12.845)
					print(db)
					--db = true
					print("d")
				end
			
			end
		end
	end
end)
--End of Script
--Local Script
wait(3)
local cam = workspace.CurrentCamera
local plr = game.Players.LocalPlayer
local db = false
game:GetService("RunService").Heartbeat:Connect(function()
if script.Parent.IsKilling.Value == true then

		cam.CameraType = Enum.CameraType.Attach
		--cam.Focus = plr.Character.Head
		cam.CameraSubject = plr.Character.Head
		
	end
end)	

game:GetService("UserInputService").InputBegan:Connect(function(input)
	if input.KeyCode == Enum.KeyCode.F then
		
	
		local Origin = plr.Character.HumanoidRootPart.Position
		local Direction = plr.Character.HumanoidRootPart.CFrame.LookVector * 20

		local parmasaen = RaycastParams.new()
		local raycast = workspace:Raycast(Origin,Direction,parmasaen)


		--print(raycast)
		if raycast then
			if raycast.Instance.Name == "Torso" or raycast.Instance.Name == "HumanoidRootPart" and db == false then
				--db = true
				if (plr.Character.HumanoidRootPart.Position.Magnitude - raycast.Instance.Position.Magnitude) >= 3 and (plr.Character.HumanoidRootPart.Position.Magnitude - raycast.Instance.Position.Magnitude)<= 5 then
					script.Parent.Raycast:FireServer(game.Players.LocalPlayer)
					
					end
				end
			end
	
		end
end)
--End of Script

Thank you for viewing/trying to help

1 Like

is your animations priority Core? if so, then that must be the problem. because animations with the same priority will blend.

1 Like

is there an idle animation?
make sure only 1 animation plays (which means the idle animation stops and the attack animation gets the pathway to be able to play, after its done the idle animation takes over)

1 Like

It’s not, what should I have it set to?

No, one anim is playing and that is the attack anim.

just found out that u have to make the orientation of the rig to be 0,0,0

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