I’ve been seeing a lot of calls to UserSettings
in the same script already provided (Animate, PlayerModule).
Is it just laziness or is there a certain reason for it?
And yes, I know what lazy instantiation is, but since they are called in quick succession, shouldn’t scoping it with a do end
block be more optimal? So from
UserSettings():IsUserFeatureEnabled("UserCameraInputRefactor3")
UserSettings():IsUserFeatureEnabled("UserRemoveTheCameraApi")
UserSettings():IsUserFeatureEnabled("UserCameraToggle")
UserSettings():IsUserFeatureEnabled("UserCarCam")
To
do
local UserSettings = UserSettings()
UserSettings:IsUserFeatureEnabled("UserCameraInputRefactor3")
UserSettings:IsUserFeatureEnabled("UserRemoveTheCameraApi")
UserSettings:IsUserFeatureEnabled("UserCameraToggle")
UserSettings:IsUserFeatureEnabled("UserCarCam")
end
I might have missed something, please let me know.