so, despite the fact that the hold animation is under the script, and it references it as " script.Hold "
it doesn’t work.
so could i get some help cause it’s really annoying and we haven’t found a solution despite trying multiple different things, such as re-exporting, checking the priority of the anim, deleting the animation and then replacing it, and a few other basic things like waitforchild or findfirstchild which also resulted in errors not finding it and saying it’s not an animation object, which is really just confusing.
local Player = game.Players.LocalPlayer
local Char = Player.Character or Player.CharacterAdded:Wait()
local tool = script.Parent
local Anims = {script.Hold}
local LoadedAnims = {}
local animator
tool.Equipped:Connect(function()
animator = Char:WaitForChild("Humanoid"):WaitForChild("Animator")
if LoadedAnims[1] == nil then
LoadedAnims[1] = animator:LoadAnimation(Anims[1])
end
LoadedAnims[1]:Play()
end)
tool.Unequipped:Connect(function()
LoadedAnims[1]:Stop()
end)
another thing to note is that yes, whenever he runs it, it is under him and it’s his game so it should work
That yielded indefinetly.
Also @bullettrain5 If you put the animation in the tool, rather than the local script, it should work. AnimErr.rbxl (32.8 KB)
Check output.
Roblox object hierarchy is strange sometimes. It might have been ignored by the client because it was in a LocalScriptinside a Tool. But if it was in a Model like the player model, it works fine. (like some custom character animations) As to why? I have no clue.
NO, don’t do that. That’s a waste and it takes up so much space. Just. NO. Just use :WaitForChild. Never use loops for waiting for something. It’s so inefficient. Use a touched event to fire a bindable event, use Event:Wait(), something else. It’s blatantly inefficient.