General tips about Two Player Animations

i am trying to achieve a relatively smooth animation between two characters (players specifically)


Im trying to achieve something like this although id like it to be a lot smoother (and also its not aligned correctly position wise most of the time) im also trying to make it a lot less robotic (as in forcing you into a specific cframe spot so that the animation actually plays out as its supposed to)

Ive tried using Moon Animator but putting the animations actually into a script between two players doesnt always play out as intended to
I have also tried a solution i found on another post about welding two parts of a player but when i tried to weld two parts of a rig to animate it just kind of made studio freeze

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!

-- here is the example of my script (its fired from a local script using User Input Service
--it is quite messy and i apologize for that, im not a very neat scripter
local RepStorage = game:GetService("ReplicatedStorage")
local punch = RepStorage:WaitForChild("Bashful")
local ServStorage = game:GetService("ServerStorage")


punch.OnServerEvent:Connect(function(player, part)
	local chr = player.Character
	local hrp = chr["HumanoidRootPart"]
	local hrpCF = hrp.CFrame
	local rarm = chr["Right Arm"]
	local larm = chr["Left Arm"]
	local tors = chr["Torso"]
	local hum = chr["Humanoid"]
	local Anim = Instance.new("Animation")
	Anim.AnimationId = "rbxassetid://6020033841"
	local Animation = hum:LoadAnimation(Anim)
	Animation:Play()
	game:GetService("Debris"):AddItem(Anim, 4)
	--5835032207
	local sounde = Instance.new("Sound", hrp)
	sounde.Parent = hrp
	sounde.Looped = false
	sounde.Volume = 1
	sounde.SoundId = "rbxassetid://5835032207"
	sounde:Play()
	game:GetService("Debris"):AddItem(sounde,2)
	local ae = false
	wait(.2)
	print("Attacking")
	local Debounce = false
	rarm.Touched:connect(function(hit)
		if hit.Parent:FindFirstChild("Humanoid") and Debounce == false and hit.Parent.Name ~= chr.Name then
			Debounce = true
			ae = true
			local ehumanoid = hit.Parent:FindFirstChild("Humanoid")
			local ehrp = hit.Parent:FindFirstChild("HumanoidRootPart")
			local ehumanoidspeed = ehumanoid.WalkSpeed
			local humspeed = hum.WalkSpeed
			ehumanoid.WalkSpeed = 0
			ehumanoid.AutoRotate = false
			hum.AutoRotate = false
			hum.WalkSpeed = 0
			hrp.Anchored = true
			ehrp.Anchored = true
			local positi = Animation.TimePosition
			local Animeea = Instance.new("Animation")
			Animeea.AnimationId = "rbxassetid://6020034353"
			local Animeeaation = ehumanoid:LoadAnimation(Animeea)
			Animeeaation:Play()
			Animeeaation.TimePosition = positi
			local p1 = hit.Parent
			local p2 = chr
			local distance = (p1.Torso.Position - p2.Torso.Position).Magnitude
			local midpoint = p1.Torso.Position + CFrame.new(p1.Torso.Position, p2.Torso.Position).LookVector * distance/2
			p1:SetPrimaryPartCFrame(CFrame.new(p1.Torso.Position, midpoint))
			p2:SetPrimaryPartCFrame(CFrame.new(p2.Torso.Position, midpoint))
			hrp.CFrame = hrp.CFrame * CFrame.new(0,.5,0)
			ehrp.CFrame = hrp.CFrame * CFrame.new(0,0,-7)
			wait(.5)
			Animation:AdjustSpeed(0)
			Animeeaation:AdjustSpeed(0)
			wait(.3)
			Animation:AdjustSpeed(1)
			Animeeaation:AdjustSpeed(1)
			local soundea = Instance.new("Sound", hit.Parent:FindFirstChild("Torso"))
			soundea.Parent = hrp
			soundea.Looped = false
			soundea.Volume = 1
			soundea.SoundId = "rbxassetid://4810749430"
			soundea:Play()
			game:GetService("Debris"):AddItem(soundea,2)
			local particles = ServStorage:FindFirstChild("Particles")
			local pclone = particles:Clone()
			pclone.Parent = hit.Parent:FindFirstChild("Head")
			pclone:Emit(10)
			print("Particles")
			game:GetService("Debris"):AddItem(pclone, 2)
			wait(.5)
			ehumanoid.AutoRotate = true
			hum.AutoRotate = true
			ehumanoid.WalkSpeed = ehumanoidspeed
			hum.WalkSpeed = humspeed
			hrp.Anchored = false
			ehrp.Anchored = false
		end
	end)
	wait(.2)
	if ae == false then
		Animation:Stop()
	end
	wait(.2)
	Debounce = true
end)

so far this is the only thing ive found that semi works (half the time)

4 Likes