[Server Authority] Instance stitching for fast projectile has werid rollbacks

I’m having a weird problem with Instance Stitching. I’m running a code like this inside BindToSimulation to fire a ball projectile at 200 studs/s:

-- this is supposed to be a weapon's projectile
local ball = Instance.new("Part")
ball.Size = Vector3.new(2,2,2)
ball.Shape = Enum.PartType.Ball
ball.CustomPhysicalProperties = PhysicalProperties.new(0.7, 0, 1, 1, 1)
ball.Material = Enum.Material.SmoothPlastic
ball.BrickColor = BrickColor.Red()
ball.CFrame = CFrame.lookAt(root.Position + dir * 5, target)
ball.AssemblyLinearVelocity = dir * 200 -- yes this is fast
ball.Parent = workspace
task.defer(function()
    RunService:SetPredictionMode(ball, Enum.PredictionMode.On) -- it moves away fast 
-- so i have to force prediction to be enabled
end)

Testing this on studio (75ms replication lag), it works most of the time, but some projectiles have a weird issue with rollback:


Moving to a public server (150ms ping), the issue becomes more apparent, as almost all projectiles have serious issues with rollback:

Slowed down video with my thoughts on what is happening:

The client console spams the error message “Part Part is not parented to the Workspace or a WorldModel. Ignoring it for physics step” whenever this rollback issue happens.
The balls seem to teleport back and forth for a few moments before becoming stable. I guess the rollback messes with their prediction mode? I’d like to know whats happening. I can share place files if that’d help

I believe this is related with RunService.Rollback providing incorrect rollback times as I noticed on my previous post: [Server Authority] RunService.Rollback provides incorrect time of Rollback

5 Likes

What I noticed watching the 2nd video:

  • the ball starts as a client only instance and behaves normally
  • when it receives a server update, it goes to the server’s position and stops prediction
  • after a few moments, the ball starts being predicted again, and goes to the position it was supposed to be at if it never stopped prediction

I believe this is caused by rollbacks temporarily altering Instance.PredictionMode (which for some reason cant be read?)

1 Like

Thanks for the thorough report! I’m investigating now.

4 Likes

Awesome. Please let me know what you find!
I’m waiting for this to be fixed to start work on the weapons of my game.

Sorry for the delay - I’ve been waiting for all the releases to go out to fix this issue, but certain mobile releases have been delayed several times. I’m rolling out the fix to Windows and Mac now, let me know if the issue is resolved!

1 Like