PipeChildren

CacheTable:PipeChildren(if non Global and Server player, Entry, SearchObject, ObjectName, Property)

This will update through GetChildren() of SearchObject. OnUpdate sets Arg Property any Child named as Arg ObjectName to the Arg Entry.

PipeDescendants Arguments:

player userdata value | Only for NonGlobal

Entry | the entry that will be found within a value.

SearchObject | The object that GetChildren() will be used on

ObjectName | Name of the object (Whitelist) that will be changed

Property | The property that will be set to the Entry Value of the cache on update (Ex: Text, Value)

Server Usage:

Example Usage for NonGlobal:

local InventoryCache = Cache:Create("Inventory", {DatastoreSave = true, Replicate = true}, { PowerLevel = 5 ["Available Slots"] = 10, {Item = "Basic Sword",Level = 1, XP = 1}, {Item = "Apple"}, } ) InventoryCache:PlayerAdded(function(player, NewCache) InventoryCache:PipeChildren(player, "PowerLevel", game.Workspace.PowerLevelBoard, player.Name, "Text" ) end)

Example Usage for Global:

local GameStateCache = Cache:Create("GameState", {Global = true, Replicate = true}, { ["LastWinner"] = "No winner so far", ["PlayersPlaying"] = 3 ["LookingFor"] = "forbrad" } ) GameStateCache:PipeChildren("LookingFor", game.Workspace, player.Name.."LookFor", "Text")

Client Usage

Example Usage for NonGlobal:

local Inventory = Cache:GetCache("Inventory") local PlrGui = game.Players.LocalPlayer.PlayerGui Inventory:PipeChildren("PowerLevel", PlrGui, "Power Level" , "Text" )

Example Usage for Global:

local Inventory = Cache:GetCache("GameState") local PlrGui = game.Players.LocalPlayer.PlayerGui Inventory:PipeChildren("LookingFor", PlrGui, player.Name.."LookFor" , "Text" )

Did this page help you?