anybody got an idea why my animation won't play is there anything wrong in the code?
local tool = script.Parent
local player = game.Players.LocalPlayer
local rs = game:GetService("ReplicatedStorage")
local cooldown = 0
local busy = false
local baseName = tool.Name
tool.Equipped:Connect(function()
tool.Parent = player.Backpack
if busy or cooldown > 0 then return end
busy = true
rs.Abilities.Events.GroundSmash:FireServer()
local plr = game.Players.LocalPlayer
local humanoid = plr.Character:FindFirstChildOfClass("Humanoid")
if not humanoid then return end
local animator = humanoid:WaitForChild("Animator")
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://93072075328621"
local track = animator:LoadAnimation(animation)
if track then
print("track valid")
track.Priority = Enum.AnimationPriority.Action
track:Play()
end
track.Stopped:Connect(function()
print("ani ended")
humanoid.WalkSpeed = 18
humanoid.JumpPower = 50
humanoid.AutoRotate = true
end)
cooldown = 5
for i = cooldown, 0, -1 do
tool.Name = baseName .. " (" .. i .. ")"
task.wait(1)
end
tool.Name = baseName
cooldown = 0
busy = false
end)
** You are now Level 3! **