PlayerMockPropertyUtils
The native properties a mock stands in for, each backed by a same-named attribute. A one-element
path names a Player property ("UserId"); a two-element one names a member of a client-global
service ("GuiService.SelectedObject"), which the mock keeps per-mock, a headless server having
one of each while a test may hold several mocks.
Members an attribute cannot hold are bridged: EnumItems round-trip through their .Name,
Instances through an ObjectValue child. Paths are checked against the engine's own reflection, so
a typo errors instead of reading back a value nothing will ever write.
Use PlayerMock.read, PlayerMock.write and PlayerMock.getPropertyChangedSignal.
Functions
seedProperties
PlayerMockPropertyUtils.seedProperties(overrides: {[string]: any}?--
Per-property seed values, keyed by property path.
) → ()
Seeds every modelled property on a fresh mock, from overrides (keyed by property path) or the
pre-authored default. Paths with no default seed nothing, which is how the Instance-valued members
stay nil the way a real Player's do before spawn.
Use PlayerMock.new.
read
PlayerMockPropertyUtils.read() → anyReturns the seeded backing attribute, or the pre-authored default when unset.
Use PlayerMock.read.
write
PlayerMockPropertyUtils.write(value: any) → ()Writing Character = nil carries the engine's despawn semantics.
Use PlayerMock.write.
getPropertyChangedSignal
Returns the backing attribute's changed signal, or the backing ObjectValue's Value-changed signal for Instance-valued members.