Lua file conversion?

My team exchanges Lua files, so I just wanted to point out that saving a local script converts it into a server script when it’s loaded back into studio.

That’s weird, I never had this problem.

Maybe it only occurs on OSX.

@AnyEngineDevsLookingAtThis Im using Windows 10, just to point out we aren’t using the same system OS

Which file format are you saving it in? .lua, .rbxm, .rbxmx? How are you loading it back into the game? Inserting it as a model (.rbxm and .rbxmx only) or in the case of a .lua file, using “Execute Script” / manually copying/pasting it into studio?

When saving the script, I right-click the script and use “Save to file”. When I want to load it, I right-click somewhere in the explorer, select “Insert into from file”, and insert the Lua file.

Okay, I see the problem now. It’s because you’re saving it as a .lua file. In Lua there’s no such thing as LocalScripts and Scripts – those are classes ROBLOX created. Make sure when you save to set the file type to .rbxm or .rbxmx:

Sadly it defaults to .lua and there’s no way to change that (to my knowledge), so you’ll have to manually change the file type every time you save just a script.

Great, thank you very much.

Interestingly, doing so on ModuleScripts doesn’t even give you a .lua file option. That seems like a weird inconsistency.

2 Likes

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