#Animation not loading for clones
1 messages · Page 1 of 1 (latest)
Small changes, it works after some private fixing BUT i now have this error
Easy fix, this should be because your using a while loop or some kind of loop in your script
This is bad because you dont get rid of the other ones
Try this script and also add a detector to check if an animation is already playinglua function Animator.StopAnimation(humanoid) local animator = humanoid:FindFirstChild("Animator") if animator then for _, track in animator:GetPlayingAnimationTracks() do track:Stop() track:Destroy() end end end
Im new to animation, first time really dipping my toes into it, so i dont know much about it, ill give this a go
I was also new, this is a script from a few months ago
do you thinktheres a way to fit what you put into here?
i tried adding a check myself
but i didnt know there was actual playing track checks
there kinda isnt
Roblox just has a hard limit
also did you commission people?
dont do that at a beginner level
no no, im not beginner, im an indie dev. Its just that iv never actually done animation or programmed animations. I do alot with math
oh
So is there any way to actually check if a specific models animator has an animation already loaded?
I kinda forgot the specifics but looking at some old code this is what I did ```lua
local function changeAnimation(animName)
if self._currentAnim == animName then return end
self._currentAnim = animName
AnimateRemote:FireAllClients(RigHumanoid, nil, false)
if animName then
AnimateRemote:FireAllClients(RigHumanoid, Animator.GetAnimationId(self.Rig, animName), true)
end
end
it uses some other functions in the same module but its basically the same thing
You using metatables for this?
no
okay okay
its a helper module for a rig
okay i understand
but that still leads me into the same issue
How do i load it only once?
no while loops
or turn loop off
or just use what I sent
it checks through all playing animations and stops them
Does it check specifically through that animator
yea
the animator in the rig
how do i reference a specifically loaded animation in an animator
like lets say i load it in one section of a script, and then in another section i want to reference it
Im not sure
ill google it, if i can figure that out then i think ill be good