02-basics-dvnv.lua
local require = require(game:GetService("ReplicatedStorage"):WaitForChild("Modules"))
local VirtualNumberValue = require("VirtualValue:Types.Number")
local DynamicVirtualNumberValue = require("VirtualValue:Types.Number.Dynamic")
local dvnv = DynamicVirtualNumberValue.new("Add", 5)
print(dvnv:getBase()) dvnv:set(0)
local vnv = VirtualNumberValue.new(5)
local vnv2 = VirtualNumberValue.new(4)
dvnv:addChild(vnv)
dvnv:addChild(vnv2)
print(dvnv:get())
dvnv:listen(function (value)
print(value)
end)
dvnv:removeChild(vnv2)