I’m trying to make a dead by daylight pallet system and I’m trying to make it as smooth as possible.
For some reason whenever you knock over the pallet the player animation kinda breaks - it only happens when the player tries moving during the animation.
I think it makes it look reasonably worse and its been getting on my nerves for awhile.
Hopefully theres a way to fix this!
In the video I try moving around (during the animation) and you can see that my legs try switching to a walking animation
I should also mention the animations n stuff are server sided
function PalletManager:PlayAnimations(side)
local plr = self.playerActivated
local char = plr.Character or plr.CharacterAdded:Wait()
local hum = char:FindFirstChild("Humanoid")
local humRoot = char:FindFirstChild("HumanoidRootPart")
local animator
if hum then
animator = hum:FindFirstChild("Animator")
end
if animator then
self.Animations.PlayerLeft = animator:LoadAnimation(animations.playerLeft)
self.Animations.PlayerRight = animator:LoadAnimation(animations.playerRight)
end
if humRoot then
humRoot.Anchored = true
end
if side == "Left" then
if humRoot then
TweenReplication:FireClient(plr, humRoot, "Lock", self.pallet.KnockPosLeft.CFrame)
end
self.Animations.PlayerLeft:Play()
self.Animations.PlayerLeft.Ended:Connect(function ()
humRoot.Anchored = false
end)
self.Animations.PalletKnock:Play()
self.Animations.PalletKnock:GetMarkerReachedSignal("AnimationEnd"):Connect(function ()
self.Animations.PalletKnock:AdjustSpeed(0)
end)
else
if humRoot then
TweenReplication:FireClient(plr, humRoot, "Lock", self.pallet.KnockPosRight.CFrame)
end
self.Animations.PlayerRight:Play()
self.Animations.PlayerRight.Ended:Connect(function ()
humRoot.Anchored = false
end)
self.Animations.PalletKnock:Play()
self.Animations.PalletKnock:GetMarkerReachedSignal("AnimationEnd"):Connect(function ()
self.Animations.PalletKnock:AdjustSpeed(0)
end)
end
end