local money = 5
local jumpBoost = 2.5
local aRandomVariable = 5
local UserInputService = game:GetService("UserInputService")
-- service name is UserInputService is it appropriate to use userInputService or UserInputService
I’m not sure if I should use camelCase for all variables to keep everything consistent or to use the actual service name become it’s referencing the service which already has a name
also is it better to use camelCase for functions too or is it neater if it’s only variables
I know this is down to preference but I want my code to be as readable and consistent as possible (for me and others)
Honestly, my code is all over the place and its just situational for what I name things. Sometimes I use underscores when there is one object that has a lot of things I need to reference (i.e data_kills, data_deaths, data_xp), most of the time i use camelCase for just normal variables such as debounces and values that I’ve stored, and for services I just name them what they’re called in the GetService.
It’s really down to however you want to do it and what you find the easiest, but if this helps there is this style guide. Naming is near the bottom. Roblox Lua Style guide