I want to check if a animationtrack is loaded and execute this code:
game.Workspace.jumpscares.Noob:SetPrimaryPartCFrame(game.Workspace.animatronicSpawn.CFrame) game.Workspace.jumpscares.Noob.HumanoidRootPart.Anchored = true wait(0.19) player.PlayerGui.scream:Play() wait(1.10) player.PlayerGui.scream:Stop() player.PlayerGui.gameover.Enabled = true
I already tried using Length and TimePosition but it didn't work.
You could check if a track is loaded by true or false bools?
local animation = --the animation here local animationTrack -- We're not going to load the animation just yet... animationTrack = Humanoid:LoadAnimation(animation) --Load the animation somepoint in your code... if animationTrack then --If the animation is loaded then.. --do thing end
Sorry if this didn't work!
You can use GetPlayingAnimationTracks as explains here:
https://developer.roblox.com/en-us/api-reference/function/Humanoid/GetPlayingAnimationTracks
or you can store the loaded animations in a table so you can check it latter.