roblox-tsr
roblox-ts4mo ago
42 replies
Ohirume

attempt to modify a readonly table

why would an attempt to modify a readonly table error happen with jecs here? (if i uncomment any of them it errors)
const playerEntity = world.entity();
// world.set(playerEntity, Player, player);
// world.set(playerEntity, HealthAttribute, { max: 100, value: 0 });
// world.set(playerEntity, FistStrengthStat, { multiplier: 1, value: 0 });
Solution
so, using jecs.component() is for preregistration, and world:component() for normal component creation
Was this page helpful?