IntValue
Hold a count in the tree.
Value is a number, 0 by default, and takes only a number. Each change fires Changed with the new value.
Made with Instance.new("IntValue") or Clone().
Example
-- An IntValue holds a whole number. Settings.Count is one, saved in the project as 3.
local count = root.Settings.Count
count.Changed:Connect(function(value : number)
print("Count is now " .. value)
end)
print("Count starts at " .. count.Value)
count.Value += 1
print("a new IntValue: " .. Instance.new("IntValue").Value)Count starts at 3 Count is now 4 a new IntValue: 0
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| Value | number | 0 | The number it holds; each change fires Changed with the new value. |
From ShotInstance 33
ClassNameNameParentAncestryChangedAttributeChangedChangedChildAddedChildRemovedDestroyingAddTagClearAllChildrenCloneDestroyFindFirstAncestorFindFirstAncestorOfClassFindFirstAncestorWhichIsAFindFirstChildFindFirstChildOfClassFindFirstChildWhichIsAGetAttributeGetAttributeChangedSignalGetAttributesGetChildrenGetDescendantsGetFullNameGetPropertyChangedSignalGetTagsHasTagIsAIsAncestorOfIsDescendantOfRemoveTagSetAttribute
