I made my own animation and for some reason it won't work in game, but it work in studio. Please help. This is my local script:
local p = game.Players.LocalPlayer
local c = p.Character or p.CharacterAdded:Wait()
local h = c.Humanoid
local tool = script.Parent.Parent.Parent.Parent
local animation = h:LoadAnimation(script.Parent)
animation.Priority = Enum.AnimationPriority.Action
tool.Equipped:Connect(function(Mouse) Mouse.Button1Down:Connect(function() animation:Play() end) end)
i had this problem before. instead of pressing the x to close studio, go to file, publish to roblox as, and then find your game
Try for "0" after Play like this: Animation: Play (0)
Script:
local p = game.Players.LocalPlayer
local c = p.Character or p.CharacterAdded:Wait()
local h = c.Humanoid
local tool = script.Parent.Parent.Parent.Parent
local animation = h:LoadAnimation(script.Parent)
animation.Priority = Enum.AnimationPriority.Action
tool.Equipped:Connect(function(Mouse) Mouse.Button1Down:Connect(function() animation:Play(0) end) end)