Hello. For values determining combat actions, like lets say bool values like canDash, canAttack etc, does it make more sense to use tables or instances? I can either set up a server sided module that creates a table for each player and replicate the changes to a client-sided read only table, or simply use instances located inside each player. Which one do you guys think is better for performance?
tables are better, though you can use either the difference is minor
Why not just straight up go for closures?
Why table if you can have a straight up value? ![]()
dont you have to store closures in a table?
no
Closures is a function that captures upvalues.
Do you think it is minor enough even for a fast paced combat game? Setting the system up is too bothersome so I rather use instances if it won’t change much
I’m gonna dissagree with previous people.
Tables would be better if you weren’t replicating them. Attributes and Instances are better for replication unless you’re really experienced with network code.
Why?
- Instances are compatible with streaming enabled.
- Instances are already optimized by Roblox, who have access to the stuff we don’t.
Trust me when I say, simplicity is key. Never trade simplicity for performance, when you don’t have a performance issue.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.