When you mark an entity for replication, you control which players receive its data by setting the value of theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/NeonD00m/feces/llms.txt
Use this file to discover all available pages before exploring further.
feces.replicated component. feces calls resolvePlayers() internally every time it builds a delta, expanding whatever value you set into a concrete list of Player instances. There are four supported filter modes, and they all flow through the same single function.
Broadcast (nil)
The simplest mode. Callworld:add without a value. Because there is no value on the component, resolvePlayers receives nil and falls back to Players:GetPlayers() — every player currently in the server gets the data.
The player list is resolved at the moment
feces:delta() runs, not when you
call world:add. If a player joins between the two calls they will already be
included in the broadcast.Single Player or String
Pass aPlayer instance (or a plain string) as the component value. resolvePlayers detects the Instance or string type and wraps it in a single-element table so the rest of the pipeline treats it identically to any other list.
List of Players
Pass a table ofPlayer instances. resolvePlayers returns it directly — no copying occurs.
Filter Function
Pass a function that accepts aPlayer and returns a boolean. resolvePlayers calls it once for every player from Players:GetPlayers() and collects those for which it returns true.
Component-Level Targeting with Pairs
All four modes above apply to the entity as a whole. If you need per-component targeting — for example, sendingTransform to everyone but PrivateStats only to the owning player — use jecs.pair(feces.replicated, Component) instead of feces.replicated directly.
During
delta(), feces checks for a plain replicated tag first. If the
entity has replicated set, that filter applies to all components that don’t
have their own pair. If only a per-component pair exists (no plain
replicated), the pair’s filter is used for that specific component.How resolvePlayers Works
Below is the full source of resolvePlayers so the behavior is unambiguous:
The
"-1" string fallback in each branch is used by feces’s own test suite,
which runs outside of a live Roblox game instance where Players is
unavailable. In production your filters will always receive real Player
objects.