how can i make a spawner system like grass cutting incremental? I can easily make parts spawn by getting a random position within the spawning radius then send it to the client to spawn the part at that position since i want part spawns to be client sided. each player has their own radius under them that follows them wherever they go and the radius can be changed/upgraded whenever (in studs). Each time a part spawns per player, the position of it gets cached on the server and then removed when it gets collected
im struggling to determine whether i should have a .Touched function checking if the radius ever touches one of those spawned parts on the client then sends that parts position or “id” (if i chose to create ids per part) to the server and from there checks if its actually within the players radius.
the second option was to just have a RunService.Heartbeat running on the server looping through each player and checking if any of their spawned/cached parts are in their radius.
im leaning more towards the second option as it seems more secure and safe but i just want to know if theres a better way since sometimes parts that arent actually in the player’s radius, but really close to it get deleted.
another issue i have with this is that if the server finds that one of the spawned parts are in the player’s radius, then the server should fire a remote to the client and delete that part, however theres a little “delay” after firing that remote which causes parts to not be deleted as soon as they are collected.
if anyone could help me or give feedback i would appreciate it a lot