Why's my table not being read properly by the script?
Asked by
3 years ago Edited 3 years ago
Hi!
So I've been scripting an animation thing, and a for loop picks up all the animations in a folder and inserts it into a table. It works, until when I try to read the table, and it just returns nil.
01 | local animInstances = { |
03 | mouseSlashInstance 1 = nil , |
04 | mouseSlashInstance 2 = nil , |
05 | mouseSlashInstance 3 = nil , |
06 | mouseSlashInstance 4 = nil , |
07 | mouseSlashInstance 5 = nil , |
10 | for i, instance in ipairs (animations:GetChildren()) do |
12 | local gsub = animations [ string.gsub(instance.Name, "Instance" , "" ) ] |
13 | animInstances [ count ] = animations [ gsub.Name ] |
16 | for i,v in pairs (animInstances) do |
20 | local idleAnim = animator:LoadAnimation(animInstances.idleInstance) |
any ideas?