PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

GetSetting

Retrieves a previously stored value with the given key, or nil if the given key doesn’t exist.

Parameters

Name Type Default Description

key

Returns

Return Type Summary

Code Samples


Plugin:GetSetting1

The below example would print the value saved to the key FirstTime. If the key doesn’t exist, it would print nil.

local Plugin = PluginManager():CreatePlugin()
local RanBefore = Plugin:GetSetting("RanBefore")
Plugin:SetSetting("RanBefore", true)

if RanBefore then
	print("Welcome back!")
else
	print("Welcome! Thanks for installing this plugin!")
end