Skip to main content

Settings

This item only works when running on the client. Client

This is a MapLib Feature. It can be accessed by MapLib:GetFeature("Settings").

Functions

GetSetting

This item only works when running on the client. Client
Settings:GetSetting(guistring) → any?

This function can be used to get the value of a setting.

Example:

-- Changes the camera FOV to an arbitrary number and then sets it back to the saved settings value.
local SettingsFeature = MapLib:GetFeature("Settings")

local camera = workspace.CurrentCamera

camera.FieldOFView = 120
task.wait(3)
camera.FieldOFView = SettingsFeature:GetSetting("Field Of View")
Show raw api
{
    "functions": [
        {
            "name": "GetSetting",
            "desc": "This function can be used to get the value of a setting.\n\n**Example:**\n```lua\n-- Changes the camera FOV to an arbitrary number and then sets it back to the saved settings value.\nlocal SettingsFeature = MapLib:GetFeature(\"Settings\")\n\nlocal camera = workspace.CurrentCamera\n\ncamera.FieldOFView = 120\ntask.wait(3)\ncamera.FieldOFView = SettingsFeature:GetSetting(\"Field Of View\")\n```",
            "params": [
                {
                    "name": "gui",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "any?"
                }
            ],
            "function_type": "method",
            "realm": [
                "Client"
            ],
            "source": {
                "line": 44,
                "path": "src/Features/Settings.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "Settings",
    "desc": "This is a MapLib Feature. It can be accessed by `MapLib:GetFeature(\"Settings\")`.",
    "realm": [
        "Client"
    ],
    "source": {
        "line": 22,
        "path": "src/Features/Settings.lua"
    }
}