BoolValue

BoolValue : ValueBase

Overview

An instance used to store boolean value. Values set on the server are automatically replicated to the client, enabling script-to-script communication without using RemoteEvent.

Properties

Value

bool

You can set a boolean value to store.

Code Samples

local SomeValue = Instance.new("BoolValue")
SomeValue.Name = "SomeValue"
SomeValue.Parent = game.Workspace

SomeValue.Value = true

Methods

Events

Changed

An event is triggered whenever the value changes.

Parameters

bool value

Changed value

Code Samples

local function OnChanged(value) 
    print(SomeValue.Name, ": ", value)
end
SomeValue.Changed:Connect(OnChanged)

See also

Manage Value

Last updated