BoolValue
Holds true or false, for scripts and players to read and watch.
- Inherits: Instance
- Creatable: Yes:
new BoolValue(), orInstance.new('BoolValue', parent). - Replication: Replicated: clients get a copy, and changes the server makes reach them.
See NumberValue for how value objects are used. Inside a player’s
leaderstats folder, a BoolValue shows as Yes or No on the leaderboard.
Properties
Section titled “Properties”Type: boolean · Default: false · Access: read/write · Replicates: yes
The boolean it holds.
Inherited from Instance: name, archivable, id, className, parent, destroyed
Methods
Section titled “Methods”Inherited from Instance: getPropertyChangedSignal, setAttribute, getAttribute, getAttributes, getAttributeChangedSignal, getChildren, getDescendants, findFirstChild, findFirstChildOfClass, findFirstChildWhichIsA, findFirstAncestor, findFirstAncestorWhichIsA, waitForChild, isA, isDescendantOf, isAncestorOf, getFullName, clearAllChildren, destroy, clone, toString
Events
Section titled “Events”Inherited from Instance: changed, childAdded, childRemoved, descendantAdded, descendantRemoving, ancestryChanged, destroying, attributeChanged
Examples
Section titled “Examples”Open a door from a switch
Section titled “Open a door from a switch”import { BoolValue, Part, ReplicatedStorage, getChild, workspace } from '@rally/sdk';
const open = getChild(ReplicatedStorage, 'DoorOpen', BoolValue);const door = getChild(workspace, 'Door', Part);open.getPropertyChangedSignal('value').connect(() => { door.transparency = open.value ? 0.8 : 0; door.canCollide = !open.value;});