Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

"Attempt to call a userdata value"? [Solved]

Asked by 4 years ago
Edited 4 years ago

The error "attempt to call a userdata value" is happening in the Animation2:Play() line. I can't find any reason for that to occur, so could you help me?

local Animation2 = Player.Character.Humanoid:LoadAnimation(game.ServerStorage.Objects.Animations.Failed)
Animation2:Play()

That error begun to appear not too much time ago and before that the script was running as usual, also I haven't edited script around that time I think. Animations from other parts of the code are loading normally though.

Edit: I forgot to mention that the script isn't even running that part of the code but still gives the error.

Fixed: It was the New Lua VM (Beta Feature) :|

0
Is this a server script? If not then, You can’t access items from server storage. Also, do all animations on the client side as it replicates and it’s a better practice. poke7667 142 — 4y
0
Yeah, it is a server script. About the animations, I didn't know they were replicated in the client so I made all of mine be loaded and played in the server script. constructionmiller 44 — 4y
0
Doing animations client-sided is an absolutely terrible idea. Do them on the server. DeceptiveCaster 3761 — 4y
0
poke, i came here to tell you that you're bad. one: you should only play animations on the client if they don't need to replicate. two: you should only do anything on the client when they don't need to replicate. three: not entirely incorrect, you can still access serverstorage but it will appear empty for the player (and you can insert stuff in there, too!)  Fifkee 2017 — 4y
0
Thanks for all the hints, but I think this error might be unsolveable since yet no one has responded. But I appreciate if anyone continues trying to find an answer, and I'll regularly check this post. constructionmiller 44 — 4y

Answer this question