Hi, I've a problem with animations. I've created a LocalScript that if a RemoteEvent is invoked it will start an animation. This is the script:
repeat wait() until game:GetService("Players").LocalPlayer
local Player = script.Parent.Parent
game:GetService("ReplicatedStorage").StartAnimationEvent.OnClientEvent:Connect(function(AnimationName)
local Humanoid = Player.Character:FindFirstChildOfClass("Humanoid")
if Humanoid then
local Animation = Humanoid:FindFirstChild(AnimationName)
if Animation then
local AnimationTrack = Humanoid:LoadAnimation(Animation)
AnimationTrack:Play()
AnimationTrack.Looped = true
if AnimationTrack.IsPlaying then
print("Is playing.")
end
end
end
end)
However even if it is printed "Is playing.", which makes me understand that everything is ok the animation does not start.

2 comments
With A Key or A Button Gui Or Something?
A command in the chat.