Attempt to index function with '' Can anyone help?

I am making a admin commands script and I keep getting this error and I’m not sure why.
52f5fada1edd841e23a2d305629dcf7d

Then if I do the command with out the prefix() I get this other error
df5e03c10151b61222269c9915621b45

Can anyone help?

Can you send a screenshot of the commands table?

1 Like

I’m sorry I don’t understand. Do you mean the script?

I mean the table, the thing that stores the command data such as its run function, aliases, etc. Maybe you could check up in the script, just look for something like local commands = { blah, blah, blah } or maybe it’s a ModuleScript.

Oh do you mean this bit?
978db7c5bfd53972c2869cc899d9d974

Huh, this is weird. I just made a test in-studio and it works for me. Are you writing the command correctly?

Yeah every time I do the (tp) command or the (speed) command it keeps saying the same error on line 179

In that case, i’m not sure what’s triggering the error, I hope someone can help you later, don’t give up.

Do the 2 parts of the script that i showed have to be together or does that not matter. But thank you anyways I wont.

It doesn’t matter. Just make sure it’s in the same script and have the same scope (make sure the commands table is not inside a function or something similar)

I don’t believe it is in any function it shouldn’t be in.

splitString{i} is an attempt to call a table value. You likely meant splitString[i].