Table exists but still says Nil in some functions

  1. What do you want to achieve?
    For the Table to be in all functions/scopes and not nil

  2. What is the issue?
    It says it’s nil in a function that runs after the Table is defined. In most functions, it says it’s a table but in a few it says it’s nil.

  3. What solutions have you tried so far?
    I tried adding a wait to it, but it didn’t change anything.

AnimationTracks[Character.Name] = {}
print(AnimationTracks[Character.Name]) --prints correctly

function Crouch(Character, Humanoid)
	local Animator = Humanoid.Animator
	local Animations = AnimationTracks[Character.Name] --returns nil
1 Like

What do you send for the Crouch function?

As the parameters say. I can test that out, however.

Yes, it returns the correct character and the same one defined in the initial function.

Try printing AnimationTracks, something could be messing with it.

1 Like

Hold on I think I figured it out.

Ok so, The character name and the one in the Crouch Function are the exact same. It appears that it’s not getting it at all, because printing the length of the parent table returns 0.

Trying to print #AnimationTracks will only count values with numbered indexes. In this case, it is a string, so that reasoning is invalid.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.