Please help me optimize this script

np glad it works

high script rates is because your script is running each heartbeat/frame that isnot a problem at all

if it keeps rising without going down then make sure that you haven’t made any memory leaks

the RECV will increase whenever you replicate/send information from server to client
1- try to not send as much data through remove events
2- you can try doing optimization techniques to reduce the sent data (there are alot of topics for this)
3-any instance that gets added to replicatedStorage or workspace will increase the network recv
4-changing the properties of instances in workspace/replicated storage through server will increase the network recv

if the unions aren’t replicated often then its fine
aka replicating a map from server storage to workspace/replicated storage that will increase the Recv but only for short time


these topics map help

How we reduced bandwidth usage by 60x in Astro Force (Roblox RTS) - Resources / Community Resources - Developer Forum | Roblox

Network Optimization best practices - how to keep your game’s ping low! - Resources / Community Tutorials - Developer Forum | Roblox

Real world building and scripting optimization for Roblox - Resources / Roblox Staff - Developer Forum | Roblox

1 Like