Hi, I'm making a game but my sword script (which is a localscript) is not playing the animation.
tool.Activated:Connect(function() script.Attack:Play() end)
this is not giving any errors or warnings, but the animation is not playing either.
Do I need to use a remoteevent and then call it when player clicks to play the animation?
Thanks
You can definitely load and play animations from the client (character animations). Your problem might be script.Attack being an Animation and not an AnimationTrack. All animations have to be loaded with the player’s humanoid, after which they can be played.
local Player = game.Players.LocalPlayer local Character = Player.Character or Player.CharacterAdded:Wait() local Animation = script.Attack Animation = Character.Humanoid:LoadAnimation(Animation) tool.Activated:Connect(function() Animation:Play() end)