I've seemingly tried everything, but my custom animations simply won't play in the Roblox client. They work fine in the studio, and I do not get any errors when I run it, but my animations just don't play.
local Tool = script.Parent.Parent.Parent
local animController = script.Parent.AnimationController
local animator = animController:WaitForChild("Animator")
local Anim = Instance.new("Animation")
Anim.AnimationId = "rbxassetid://4909182058"
local idle = Instance.new("Animation")
idle.AnimationId = "rbxassetid://4909225193"
local Handle = Tool.Handle
local animationTrack = animator:LoadAnimation(Anim)
local Players = game:GetService("Players")
local lastAttack = 0
local localPlayer = Players.LocalPlayer
local idleTrack = animator:LoadAnimation(idle)
idleTrack.Looped = true
idleTrack:Play()
local function idle()
while Tool.Enabled == true do
idleTrack:Play()
print "I'm bored"
wait(5)
end
end
local function Hooray(Tool, Anim)
if lastAttack < 0.1 then
idleTrack:Stop()
animationTrack:Play()
lastAttack = 2
idleTrack:Play()
print "yay"
wait(2)
elseif lastAttack > 0.1 then
lastAttack = lastAttack + 0.2
print(lastAttack)
end
end
local function Cooldown()
if lastAttack == 2 then
while lastAttack > 0 do
lastAttack = lastAttack - 0.1
wait(0.1)
end
end
end
Tool.Activated:Connect(Hooray)
Tool.Equipped:Connect(idle)
Tool.Deactivated:Connect(Cooldown)
This is a local script, located inside a model, inside a part, inside a tool. Like I said, it throws no errors and all the logs go through (on the client side only, though) when I run it through the client, so I really don't know what else to do.

2 comments
do animatioon thing on surver ty
I don't understand