I’ve been making my own game for months. Have organized scripts, modules, assets, and stuff. When i tested the game. I received like 19-21KB/s overall. I tried disabling every scripts I worked on. But still hasn’t changed. But, there’s one script that literally changes from 19+ to like 1-3KB/s. It was placed inside a workspace.
local RunService = game:GetService("RunService")
local Model = script.Parent
RunService.Heartbeat:Connect(function(dt:number)
Model:PivotTo(Model.PrimaryPart.CFrame*CFrame.Angles(0,math.rad(15)*dt,0))
end)
Anyone could explain me about this? And are there any way to solve this problem? (My grammar is bad, sorry.)
Well its probably running on the server
constantly changing something on the server is a pretty bad idea unless you absolutely need it (and please reconsider if you actually need to do it)
its basically like doing tweens on the server.
you can probably move it every 1-2 seconds or so instead on the server, delete on the client side and make a duplicate and do the smooth movement on the client to sync it up (and have the client detect hits from the client sided part instead inscase its a kill brick of some sort + server sanity checks with the server sided part.
Could use those tween modules that handle the networking for you
I don’t have time for now. Gotta go check for more replies later. Actually i didn’t think of that, because i had a script that loops every 1 second. And thinking that it’s only the issue on serverscriptservice except on workspace.