`AvatarMood:228` - Attempt to Index Nil with 'Play' in CoreScripts

Environment:

  • Platform: Windows 11
  • Roblox Studio Version: 0.683.1.6830778 (64 Bit)
  • Mode: Play Solo / Start Server

Summary:

While running a game in Studio, the following error is thrown by the CoreScript AvatarMood at line 228:

Script Context.CoreScripts/AvatarMood:228: attempt to index nil with 'Play'

This appears to be a nil reference within the CoreScript attempting to call the Play() method on an object that was not properly initialized or retrieved.


Steps to Reproduce:

  1. Open Roblox Studio
  2. Start the game using “Play” or “Start Server”
  3. Wait for character initialization
  4. Observe output/log window

Observed Behavior:

An error consistently appears:

Script 'Script Context.CoreScripts/AvatarMood', Line 228  
attempt to index nil with 'Play'

This is triggered from within the built-in AvatarMood CoreScript, which is not user-editable.


#Expected Behavior:
The AvatarMood CoreScript should handle all internal object references safely, including checking for nil before calling methods like Play(). No runtime error should occur from within a protected engine script under normal gameplay conditions.


Impact:

This error does not crash the session but contributes to unnecessary noise in the developer console and may interfere with debugging. It could indicate deeper issues with character animation state or avatar mood dependencies that fail silently except for this log.


Request:

Requesting internal review of the AvatarMood CoreScript around line 228 to ensure that the object calling Play() is non-nil and valid at runtime. If the issue depends on a specific character state or avatar type, handling logic should be adjusted accordingly.


Additional Notes:

  • This error only occurs sometimes but my avatar has UGC items.
  • No custom code modifies moods or CoreScripts directly
  • Character loads with default animation and avatar bundles
1 Like

Hello there, thanks for your in depth report. We’ll look into the issue and post an update once addressed.

Hello again, just wanted to let you know we’ve addressed the issue and it should not happen anymore in next week’s release.

3 Likes

Is it a studio bug, right? You guys should fix it soon i’m trying to test my game

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