All my scripts broke

Last night all my scripts in my game broke showing “function, end, local” etc, don’t function.
Spare me because I’m not a big script person and don’t really keep up with the release notes often.
Heres an example:


I’m not sure whether they changed them or what. But everything helps.
Thanks!

3 Likes

Belongs in #help-and-feedback:scripting-support

1 Like

I knew there was a topic for it, I couldn’t find it!
Thank you!

2 Likes

Unless you had your own Sound script in StarterCharacter, as of yesterday the “Sound” script no longer automatically gets created in the Character. Instead it gets parented to the PlayerScripts as “RbxCharacterSounds”

Youre likely yielding forever on your WaitForChild(“Sound”) call

Previously, to future proof this behavior, I would have suggested creating an empty Sound script in StarterCharacter instead of trying to destroy it, though its no longer necessary to do now. Instead I would create an empty blank script in StarterPlayer named “RbxCharacterSounds” to override it.

1 Like

I see. Though this was just an example of what my other scripts are doing, that does help alot

Do you know why local, false, end, etc are highlighted red as if they aren’t functioning anymore?

Those are considered “keyword” in lua syntax. The script editor has a setting to change the color of lua keywords in the script editor.

They have always been bolded and had the option to be in a different font color. If you have recently changed your settings or flipped from light to dark theme in studio, you may have noticed it changing to red. In dark theme, this salmon red is the default color for lua keywords.

You can change your theme settings in studio settings under Filer > Settings and scroll to the bottom of the main tab.