Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

help with mass lag all of a sudden?

Asked by 5 years ago
Edited 5 years ago

I recently discovered that when there are more than two players on a server, scripts are really laggy and don't respond instantly, they work just fine in the studio and moderately fine when Im the only one in the server, but when there's another player everything bugs out. because of FE alot of the models run by clickdetectors, those and scripts in charge of bodyvelocity/angularvelocity are the ones that lag so much, most of the GUIs work perfectly. is there a way to speed up script responses?

script for a seat that moves around:

seat = script.Parent velocity = seat.BodyVelocity bg = seat.BodyAngularVelocity

while true do if seat.Throttle == 1 then velocity.velocity = seat.CFrame.lookVector * 20 end if seat.Throttle == 0 then velocity.velocity = seat.CFrame.lookVector * 0 end if seat.Throttle == -1 then velocity.velocity = seat.CFrame.lookVector * -20 end if seat.Steer == 1 then bg.angularvelocity = Vector3.new(0,-2,0) end if seat.Steer == -1 then bg.angularvelocity = Vector3.new(0,2,0) end if seat.Steer == 0 then bg.angularvelocity = Vector3.new(0,0,0) end wait() end

problem:the seat does not respond instantly, all movement is delayed.(btw I tried organizing the script for you to read easier but I cant)

0
Maybe if you posted the code? User#19524 175 — 5y
0
You might want to consider giving client control of objects using body movers https://www.robloxdev.com/articles/Network-Ownership Vulkarin 581 — 5y
2
Formatted version of OP's code: https://pastebin.com/RxuDvqkd WillieTehWierdo200 966 — 5y
0
Wow, how did you know? mixgingengerina10 223 — 5y
0
Vulkarin, you mean with remote events right? mantorok4866 201 — 5y

Answer this question