Cleaner, module script code

Hello I wrote some code for a module script, and I wanna know if there’s a way to make it look cleaner.

(This is for a loading screen.)

local GUI = {
	GameText = {
		
		TransparentBackground = false,
		TextColor = Color3.fromRGB(255, 184, 55), -- Set it as false if you want it black | Format = Color3.fromRGB(255, 184, 55)
		Text = "Wow Test", -- Set false if you want the games name | Format = "Text"
	
	
	},
	
	Image = {
		
		GUITransparency = false,
		
	},
}

return GUI

Because right now it looks hard to use.

Thank you, let me know if I use the wrong topic.

2 Likes

I’m not super clear on what this code is doing, but I think this will clean it up a bit for you. Removes unnecessary indentation and makes the code more readable in my opinion.

local GUI

GUI.GameText = {
	TransparentBackground = false,
	TextColor = Color3.fromRGB(255, 184, 55), -- Set it as false if you want it black | Format = Color3.fromRGB(255, 184, 55)
	Text = "Wow Test", -- Set false if you want the games name | Format = "Text"
}
	
GUI.Image = {
	GUITransparency = false,
}


return GUI
3 Likes

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