Hello, my name is Axel, I am trying to solve a problem that I have been trying to solve for days, but I did not find, I even asked for help in the forum but I did not find a satisfactory solution, I am trying to get the animations to replicate correctly on the server but They are still seen, they do not reproduce as they should, only the local player can see it and when I die I get an animation error that refers to line 8 of “AnimationTrack”, I want to clarify that I am not an expert in this and a sample of the problem is the following:
As I said before, I have not been able to solve the problem, all this is being executed from a local script that is inside a tool in StarterPack, this is the code:
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local tool = script.Parent
local Animator = Humanoid:WaitForChild("Animator")
local Anim = Instance.new("Animation")
Anim.AnimationId = "rbxassetid://6350259222"
local AnimationTrack = Animator:LoadAnimation(Anim)
local Anim2 = Instance.new("Animation")
Anim2.AnimationId = "rbxassetid://6364334315"
local AnimationTrack2 = Animator:LoadAnimation(Anim2)
local RS = game:GetService("ReplicatedStorage")
local Strength = RS.RemoteEvents.Strength
local db = false
--Animation
tool.Equipped:Connect(function()
AnimationTrack:Play()
AnimationTrack.Priority = Enum.AnimationPriority.Idle
Humanoid.UseJumpPower = true
Humanoid.WalkSpeed = 0
Humanoid.JumpPower = 0
end)
tool.Activated:Connect(function()
if db == false then
db = true
AnimationTrack2:Play()
AnimationTrack2.Priority = Enum.AnimationPriority.Action
Strength:FireServer()
wait(2)
db = false
end
end)
tool.Unequipped:Connect(function()
AnimationTrack:Stop()
AnimationTrack2:Stop()
Humanoid.UseJumpPower = true
Humanoid.WalkSpeed = 16
Humanoid.JumpPower = 50
end)
If I am missing something important, you can let me know and I would appreciate the help, thanks!
Hi, I am having the same problem. It gives me an error saying " clampKeyframeTime called but animation asset isn’t loaded in animationTrack." Everything is working fine earlier and I didn’t even changed anything.
If its executing by a local script, make sure to add a remote event, which fires whenever a its is called!
Let me show you an example;
(LocalScript)
local hi = "Hello! "..game.Players.LocalPlayer.Name
game.ReplicatedStorage.EVENT:FireServer(hi)
(ServerScript)
-- Fires whenever EVENT is called
game.ReplicatedStorage.EVENT.OnServerEvent:Connect(function(player,hi)
print(hi) -- Will print "Hello! "..{user} and will be seen for everyone
end)
…this is the game, reply back if you still need help!
I understand you, but the problem is that the animation works perfectly on the client, but it does not replicate well on the server, apart from the fact that when I die I get an error and the animations stop working.
You are correct in stating that you do not need remote events to allow the server to see the animations. Animations should automatically replicate to the server. I have also started experiencing this problem as of recently.
Yes, everything seems to work fine on the client, the problem is that the animations are not replicated correctly on the server, apart from that when I die I get an error.