IntValue

IntValue : ValueBase

Overview

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

Properties

Value

number

You can set an integer value to store.

Code Samples

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

SomeValue.Value = 2

Methods

Events

Changed

An event is triggered whenever the value changes.

Parameters

number value

Changed value

Code Samples

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

See also

Manage Value

Last updated