Hey I'm having a little bit of trouble playing my animation here is the code:
local SwordAnim = script.Parent:WaitForChild("SwordAnim") script.Parent.Activated:Connect(function() SwordAnim:Play() end)
I don't know if im forgetting something or what
You need to load the animation before you can play it. You will need to add this
local Player = game.Players.LocalPlayer local Character = Player.Character or Player.CharacterAdded:Wait() local Humanoid = Character:WaitForChild("Humanoid") local SwordAnim = script.Parent:WaitForChild("SwordAnim") local SwordTrack = Humanoid:LoadAnimation(SwordAnim) script.Parent.Activated:Connect(function() SwordTrack:Play() end)