Hi, i have problem, i try to play animation on client, with Animator with animation controller, but the animation don’t shows, it’s published under the group and i have no clue what happened, here is script
local remote = game:GetService(“ReplicatedStorage”):WaitForChild(“Remote”):WaitForChild(“Events”):FindFirstChild(“ReplicateAnimation”)
local controller = model:FindFirstChildWhichIsA(“AnimationController”)
if controller then
local Animator = controller:FindFirstChild(“Animator”)
local track = model.Humanoid:LoadAnimation(animation)
track:Play()
end
end)
animations are loaded on start of game from module on server in replicated storage, then the event fire this function
Probably because controller doesn’t exist for some reason, or the event is never triggered. Try this and see if it works when you instantiate an animation object yourself and also check if it prints:
local player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:FindFirstChild("Humanoid")
local remote = game:GetService(“ReplicatedStorage”):WaitForChild(“Remote”):WaitForChild(“Events”):FindFirstChild(“ReplicateAnimation”)
remote.OnClientEvent:Connect(function(model:Model,animation:Animation)
print("YES")
local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/asset/?id=YOUR_ID"
local track = humanoid:LoadAnimation(animation)
track:Play()
end)
soo it works, but the animation don’t play on character, even i can print track that is loaded, but track:play() makes nothing
and i preload animations, first module reads id’s from table for different things like mobs, weapons ect… then it makes new animations on server in replicated storage.