heyo! currently working on a roblox project in which i need to put together a part building system (similar to studio tools or f3x) as apart of the main gameplay loop.
based on a game i used to play a long time ago [now broken due to filtering enabled]: it’s a round based game where each round players will be given a prompt to build and then will construct it within the given area and time limit, which then the server will take the builds for later gameplay purposes.
quick context for the building system [thanks to @yoda962 for reminding me to add context]: when building, the player is giving a series of simple tools [common place in studio] such as a part placer, a resizer, a rotator & a paint tool. i might expand the series of tools later but this is the main lot i want to do for now
the issue isn’t the building system itself (don’t think it would be too hard to put that together) but having it replicate over to the server and preventing that from being easily exploitable. i’ve considered making the player send an event over to the server each time the player finished / completes an action such as resizing or rotating a part but i don’t really know if thats optimal or not
this is more of a hypothetical than an actual issue with code, but it would be helpful to get some advice on what would be the best way going forward to make it both smooth on the client while keeping it safe on the server
A lot of context is missing here, but assuming the parts are made on the client, why not just clone them on the server? To address the exploiter issue, add debounces of 0.5 seconds per part (assuming players cant place that fast) and set attribute checks on the server before cloning the part, to check if theyre able to draw (decide when that logic should be made).
wasn’t really sure if i needed more context but to quickly give some more: in the building system, the player is given a few simple tools [that are also present in studio]: that being a part placer, a resizer, a rotator and a paint tool. i might include more later on but those are the main ones i want to do for now, simple enough & not too hard to add [ill edit this into the main body of my post for context, thanks for lmk!!]
also that would probably work fine for placing parts, but i’d assume i might need some other systems for modifying said parts. thanks for the suggestion tho!! :]
based on your new context it sounds like you wanna store for rounds, assuming its still all on the client, you could cache it in a table (unless you want it in real time, then fire remotes every 0.5 seconds or such), I did something like this for an editible image with art, as the server cant see the image for some reason, so i had to fire to the server back to clients. Cache the position, size, and color and handle it all on the client BUT, never trust the client. Always check the array submitted, check for high part counts (entries), such as 500+, huge sizes, and what not. I still think it would be easier to clone it on the server, but this works if you wanted to handle it all on the client, and only send the cached data over on submission!
i see i see! thanks for the suggestions, i’ll keep them in mind!
ill either do something like wrapping up the client side build into a table and sending it over to the server like you suggested [with server-side checks] or have the client send when an action has been completed over to the server for it to replicate