I have been trying to get custom animations to work in my game but for some reason they just never play.
I first tried replacing the walking animations from the default animate script but that just plays the original walking animation. Then I tried adding a equip animation for a tool, but that doesnt play but the animation itself isn’t nil.
The animations are R6 but even after setting the game’s avatar settings to R6 it still doesn’t play.
Replacing the IDs in the animation script used to always work so I have no idea why it isn’t now.
I tried setting permissions to the experience id but it says “It doesn’t exist” even though it does.
Tool equip script:
local module = {}
local player = game.Players.LocalPlayer
local AnimationIds = {
"rbxassetid://88563021018611"
}
local Tracks = nil
local function loadAnimations(humanoid)
if not humanoid then return end
Tracks = {}
local animator = humanoid:FindFirstChildOfClass("Animator")
if not animator then
animator = Instance.new("Animator")
animator.Parent = humanoid
end
for index, animationId in pairs(AnimationIds) do
local animation = Instance.new("Animation")
animation.AnimationId = animationId
local track = animator:LoadAnimation(animation)
track.Priority = Enum.AnimationPriority.Action
Tracks[index] = track
end
end
function module:Start(tool)
if not tool then return end
print("Started Tool: ", tool)
local char = player.Character or player.CharacterAdded:Wait()
local humanoid = char:WaitForChild("Humanoid")
loadAnimations(humanoid)
tool.Equipped:Connect(function()
if Tracks and Tracks[1] then
print("Playing animation...")
Tracks[1]:Play()
else
warn("No track found")
end
end)
end
return module
Animate Script Table:
local animTable = {}
local animNames = {
idle = {
{ id = "http://www.roblox.com/asset/?id=507766666", weight = 1 },
{ id = "http://www.roblox.com/asset/?id=507766951", weight = 1 },
{ id = "http://www.roblox.com/asset/?id=507766388", weight = 9 }
},
walk = {
{ id = "http://www.roblox.com/asset/?id=88452872017621", weight = 10 }
},
run = {
{ id = "http://www.roblox.com/asset/?id=88452872017621", weight = 10 }
},
swim = {
{ id = "http://www.roblox.com/asset/?id=507784897", weight = 10 }
},
swimidle = {
{ id = "http://www.roblox.com/asset/?id=507785072", weight = 10 }
},
jump = {
{ id = "http://www.roblox.com/asset/?id=507765000", weight = 10 }
},
fall = {
{ id = "http://www.roblox.com/asset/?id=507767968", weight = 10 }
},
climb = {
{ id = "http://www.roblox.com/asset/?id=507765644", weight = 10 }
},
sit = {
{ id = "http://www.roblox.com/asset/?id=2506281703", weight = 10 }
},
toolnone = {
{ id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
},
toolslash = {
{ id = "http://www.roblox.com/asset/?id=522635514", weight = 10 }
},
toollunge = {
{ id = "http://www.roblox.com/asset/?id=522638767", weight = 10 }
},
wave = {
{ id = "http://www.roblox.com/asset/?id=507770239", weight = 10 }
},
point = {
{ id = "http://www.roblox.com/asset/?id=507770453", weight = 10 }
},
dance = {
{ id = "http://www.roblox.com/asset/?id=507771019", weight = 10 },
{ id = "http://www.roblox.com/asset/?id=507771955", weight = 10 },
{ id = "http://www.roblox.com/asset/?id=507772104", weight = 10 }
},
dance2 = {
{ id = "http://www.roblox.com/asset/?id=507776043", weight = 10 },
{ id = "http://www.roblox.com/asset/?id=507776720", weight = 10 },
{ id = "http://www.roblox.com/asset/?id=507776879", weight = 10 }
},
dance3 = {
{ id = "http://www.roblox.com/asset/?id=507777268", weight = 10 },
{ id = "http://www.roblox.com/asset/?id=507777451", weight = 10 },
{ id = "http://www.roblox.com/asset/?id=507777623", weight = 10 }
},
laugh = {
{ id = "http://www.roblox.com/asset/?id=507770818", weight = 10 }
},
cheer = {
{ id = "http://www.roblox.com/asset/?id=507770677", weight = 10 }
},
}
I also set the animation objects inside the script to the right ids too.



