The animation object has a property which shows if it is loaded or not.
Animation.IsLoaded
It is represented using a boolean value.
true if it is loaded
false if not
it doesnt seem to be printing, i do /e dance but I dont get the print to confirm that is working
here’s the script im currently using
local players = game:GetService("Players")
players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect (function(character)
if character.Animate then
if character.Animate.Dance then
if character.Animate.Dance.Animation1.IsPlaying == true
or character.Animate.Dance.Animation2.IsPlaying == true
or character.Animate.Dance.Animation3.IsPlaying == true then
print('Dancing!')
end
end
end
end)
end)
It is because this event only fires when player is added.
Try something like(inside the player added function)
player.Chatted:Connect(function()
the code inside
end)
wait(5)
local character = script.Parent.Parent.Parent
if character.Animate then
if character.Animate.dance then
if character.Animate.dance.Animation1.IsPlaying == true
or character.Animate.dance.Animation2.IsPlaying == true
or character.Animate.dance.Animation3.IsPlaying == true then
print('Dancing!')
end
end
end
script works when it comes to finding the character.Animate but there’s an issue again
" IsPlaying is not a valid member of Animation "Workspace.ShinonArtZ.Animate.dance.Animation1 "
I am sorry for not responding after my last reply.
It was night for me and I had to sleep.
Today morning I tried seeing the issue and found that Animation and Animation tracks are different and IsPlaying is a property of Animation track and not the animation itself.
I have been trying to work out the solution.
Sorry for anything misleading.
I post if I get anything helpful and something that can solve the problem.
No worries I made the script work myself I will post it in the morning, just a heads-up tho it’s not very optimized and will lag the game a lot so I need to go around it in a different way like using remote events
while true do
animationLength = animationTrack.Length
if animationLength > 0 then
break
end
-- Loop until the animation is fully loaded
task.wait(0.01)
end