Did ROBLOX break VectorForce and/or PreRender/RenderStepped or something?

I would’ve put this in Bug Reports but I’m not sure whether it is a bug or not.

But recently, while testing my ball game I noticed on occasion that the ball would lag to the point where it’s almost unplayable, however this only occurs sometimes. I tried on a different place and the same issue occurs.

Here’s a video:

Notice how it stutters (it’s not a part of the video)
I update the VectorForce in a :BindToRenderStep, I tried switching it for Heartbeat, same issue occurred.
So that’s why I’m considering that maybe VectorForce is broken?

This issue never occurred before, the place in the video is a brand-new place without any of the extra additions I made in the main place.

Set the network ownership to the player, only saw the video and that’s my first guess instantly

I run this line of code when the ball is spawned:

newBall:SetNetworkOwner(player)

When I tried removing it, it was like 10x worse so yeah…

Are you putting the forces on the ball on the Server or client? Keep in mind that all roblox physics when the network ownership is set to a network owner (i.e player) replicates to the server so you should NOT enact any physics on the server but instead on the client.

1 Like

All the physics are handled on the client, I update the VectorForce in a module script which is client handled.

1 Like

I found out that Raycasting every RenderStep causes lag, which is confusing because it never happened before, but I reduced the effect by only Raycasting every 0.05 seconds.

Never mind it fixed nothing, it still lags every so often…

ray casting isnt that heavy, even doing it every frame has almost no impact on performance

3 Likes