#Desynchronization in projectiles

1 messages · Page 1 of 1 (latest)

fringe frigate
#

Does anyone have any idea why this is happening in my game? If you notice, there is a very noticeable desynchronization when spawning the projectile when it is seen on the server and when it is seen by another player. But locally it looks correct

    local p = Instance.new("Part")
    p.Size, p.Shape         = Vector3.new(0.8,0.8,0.8), Enum.PartType.Ball
    p.Material              = Enum.Material.Neon
    p.BrickColor            = BrickColor.new("Cyan")
    p.Anchored, p.Massless  = false, true
    p.CanCollide, p.CanTouch, p.CanQuery = false, false, false
    p.CFrame, p.Parent      = CFrame.new(origin), workspace

    local att = Instance.new("Attachment", p)
    local lv  = Instance.new("LinearVelocity")
    lv.Attachment0            = att
    lv.VectorVelocity         = dir * PROJECTILE_SPEED
    lv.MaxForce               = math.huge
    lv.VelocityConstraintMode = Enum.VelocityConstraintMode.Vector
    lv.RelativeTo             = Enum.ActuatorRelativeTo.World
    lv.Parent                 = p

    if owner then p:SetNetworkOwner(owner) end
    game:GetService("Debris"):AddItem(p, PROJECTILE_LIFE)
end```
uneven torrent
#

maybe try using a raycast simulated bullet instead

snow gyroBOT
#

studio** You are now Level 1! **studio

wintry parrot
#

to fix it imo just remove the setnetworkowner

gentle lichen
#

yk exploiters can teleport the bullet into the enemy if you give them network owner, make server raycast and tell all clients to hallucinate a bullet following the ray (probly just tween it from origin to hit) that way everyone will have em all smooth