IntValue class stores a single integer value (whole numbers without decimals), extending from Class.Value. It's designed for synchronizing integer values across all clients in a networked environment, such as player scores, round numbers, or item counts. IMPORTANT: Values should be changed on the server side. The Changed event should be connected on the client side to receive updates. NOTE: You can optionally pass a player object as the third parameter to associate the value with a specific player. Alternatively, you can concatenate the player ID to the name: "ValueName" .. tostring(player.id)
Properties
Represents the synchronized integer value. Changes trigger notifications across clients via the Value.Changed event.
local points = IntValue.new("Points", 0)
points.value = 100 -- Syncs to all clients
print("Current points: " .. points.value)
Updated 19 days ago