Teleport after RequestStreamAroundAsync does not work

I am having an issue with pivoting a character model immediately after requeststreamaroundasync has finished yielding. We have been unable to replicate this issue accurately in-game or in an empty baseplate with the same code. When the teleport fails, server output states that the player only exists at the teleport position for a few frames before going back to the previous position. This issue will only happen once per teleport position, then never happen again. This would usually indicate a client issue, but we have nothing in our code that is stating it is actively teleporting the player back. Here is what the output looks like:
RobloxPlayerBeta_zCOgiJjfQh

Here are the properties we have that relate to this issue:
RobloxStudioBeta_v3nSK2QN5o
The teleport script:

local function TeleportModel(Model, Location: CFrame)
		if not Model or not Model.Parent then
			return 
		end
		
		--Model:SetAttribute("TeleportWhitelist", Location.Position)
		Model:PivotTo(Location)
		Model.PrimaryPart.AssemblyLinearVelocity = Vector3.zero
	end
	
	function Teleport:Move(Character, Location: CFrame)
		--local a = os.clock()
		
		if Streaming == true and Character.Player.Object.Parent == Players then
			--print("streaming start")
			Character.Player.Object:RequestStreamAroundAsync(Location.Position,2)
			task.spawn(function()
				for i = 1,60 do
					print(Character.Object:GetPivot().Position)
					task.wait()
				end
			end)
		end
		TeleportModel(Character.Object, Location)
		--warn("pivoted model in",os.clock()-a)
	end

There is nothing special going on with the teleport. I invoke a remote function, verify remote arguments, then teleport the player character do a place very far away from their current position.

Current fixes we have tried implementing:

  • teleporting the player 5-10 times every frame after the initial teleport (same issue)
  • changing StreamingIntegrityMode (tried all of them, the game needs pause mode to work correctly though)
  • changing StreamOutBehavior (same issue)
  • teleporting after a short delay when streamaroundasync finishes (same issue)
  • removing the assemblylinearvelocity line (same issue, unrelated)
  • disabling the one localscript we use to teleport the player if they fall out of the map, also used for streaming pauses (we checked with prints, the script never had a false positive anyways)
  • removing all welded objects on the character (this should not matter anyways since i use PivotTo)

From the solutions we have tried, I am led to believe this is some client-related streaming bug with physics pausing. I am unable to provide a place file because I am not allowed to, but the teleport script before is all that the game does.

1 Like