{% hint style="info" %}
You can access ConVar instance through CVar
{% endhint %}
{% hint style="warning" %}
In all examples below, cvar is an instance of ConVar.
{% endhint %}
| Name |
Type |
Description |
| value |
string |
ConVar value as a string |
local string_value = cvar:GetString()
| Name |
Type |
Description |
| value |
int |
ConVar value as int |
local int_value = cvar:GetInt()
| Name |
Type |
Description |
| value |
float |
ConVar value as a float |
local float_value = cvar:GetFloat()
| Name |
Type |
Description |
| value |
Color |
ConVar value as a Color |
local color_value = cvar:GetColor()
| Name |
Type |
Description |
| value |
int |
New convar's value |
local var = cvar:SetInt(1)
| Name |
Type |
Description |
| value |
string |
New convar's value |
local var = cvar:SetString("Hello world, it's me")
| Name |
Type |
Description |
| value |
float |
New convar's value |
local var = cvar:SetFloat(1.0)
| Name |
Type |
Description |
| value |
Color |
New convar's value |
local var = cvar:SetColor(Color.new())