Hello everyone, this is a followup post to yesterday’s post reagrding the same issue, but i will go into more detail here, appolagies for being so vague in my last post it was rather late for me.
So, The issue is that the animations for one of my creatures are not replicating to the server. The code used to animate this creature is the same as I use for every other creature. This is the only creature with this problem.
Things ive tried:
-
Reuploading the animations
-
Loading the animations the line before they’ll be played
-
Running the animations on a differant local script (to check if they’ll play at all)
Gif: https://gyazo.com/4f341e43d644c7ad73f23df10d5407e8
(Tail drag is done locally, that is meant to not replicate)
Code:
local char = game.Players.LocalPlayer.Character
local currentAnim = "Idle"
local humanoid = char:WaitForChild("Humanoid")
Idle = humanoid:LoadAnimation(script.Parent.Parent.Info.Animations.Movement.Idle)
Walk = humanoid:LoadAnimation(script.Parent.Parent.Info.Animations.Movement.Walk)
local function stopAnimations()
Idle:Stop(char.Info.Animations.Movement.TransitionTimes.WalkTransition.Value)
Walk:Stop(char.Info.Animations.Movement.TransitionTimes.WalkTransition.Value)
end
function charMoving(speed)
if speed > char.Info.Stats.Movement.WalkSpeed.Value / 1.5 and currentAnim ~= "Walk" then
currentAnim = "Walk"
stopAnimations()
Walk:Play(char.Info.Animations.Movement.TransitionTimes.WalkTransition.Value)
elseif speed < 2 and currentAnim ~= "Idle" then
currentAnim = "Idle"
stopAnimations()
Idle:Play(char.Info.Animations.Movement.TransitionTimes.WalkTransition.Value)
end
end
Idle:Play()
humanoid.Running:Connect(charMoving)
game:GetService("RunService").Heartbeat:Connect(function()
if (humanoid.MoveDirection:Dot(char.PrimaryPart.CFrame.LookVector) < 0) then
Walk:AdjustSpeed(-1)
end
if (humanoid.MoveDirection:Dot(char.PrimaryPart.CFrame.LookVector) > 0) then
Walk:AdjustSpeed(1)
end
end)
Ive been struggling with this bug for three days now and cant figure out the cause since the code works on every other creature!