Hi there, so I’ve been using StreamingEnabled for my game.
I need it since you teleport 2000 studs away to the inside of a building which has not been loaded in yet to prevent lag, however, there is the issue of players falling through the floor right after being teleported there as the floor does not load instantly.
Of course, there is a simple fix for this, turning on ClientPause so that the game temporarily pauses as it loads in, so I used this and it worked great. Until I walked around my map. I can’t walk 20 studs without sudden annoying pauses, it makes the game so unenoyable, here is an example of what I mean:
The reasonable solution for this would be to change my Streaming settings, which I have done around 60 times now, with so many different combinations:
No matter what I try, the issue still persists, constant annoying pausing whenever I walk around the map a such a slow pace, however I do need pause enabled since otherwise people fall through the floor and die when teleporting to places.
Does anyone have any idea of how to fix this or what I can do to fix it?
How about raising the destination height, so there is a brief drop period after the tele?
Another possibility, @LightBoltex recently posted this thread where he explains how to exclude items from streaming by cloning them on the client from replicated storage.
Maybe you could make a small landing brick with this method.
Another idea I thought of would be to freeze the HumanoidRootPart of the player once you teleport them until the client can recognize there’s ground below it by sending Rays to the ground.
This probably explains why actual AAA games use loading screens between areas to preload with a system like StreamingEnabled and also wait for it to be safe for the client to actually be able to play in the rendered area.
I don’t know, did you try it? I have not tried It I just read about it today. That thread lead me to believe these parts would be static, never unloaded?
When teleporting a character, you want to anchor or in some way stop the character, put up a loading screen for a short time, set the ReplicationFocus to the new area, teleport the character, then set ReplicationFocus back to nil and take down the loading screen. This will ensure the new area is loaded before the character teleports.
Yeah? What was it? I was gonna ask you if you used a localscript, his steps were:
Step 4: If you wish to create items from streaming enabled, do the following:
Create a folder in ReplicatedStorage called “Exclusions”.
Put the objects you want to exclude within the folder.
Create a local script in StarterPlayerScripts with the following code:
local ReplicatedStorage = game:GetService(“ReplicatedStorage”)
local Exclusions = ReplicatedStorage:WaitForChild(“Exclusions”)
for i, obj in pairs (Exclusions:GetChildren()) do
local clone = obj:Clone()
clone.Parent = workspace
end
They could create an anchored part at the location they want to teleport to via script. If they have the location they want a character to tp to, that should be all they need.
@prepsure, thanks for recommending this, I was able to use this in my game to make far away models visible by cycling the focus through them when a player joins. I made a table of the models that HAVE to be seen and cycle through them like this:
game.Players.PlayerAdded:Connect(function(player)
for _, model in ipairs(focustargets) do
if model then
player.ReplicationFocus = model
wait()
player.ReplicationFocus = nil
end
end
end)
And it works great! I don’t know if the wait() is required but I figured I’d give it a beat to give it a chance to kick off the rendering.
One of the objects is 30K studs away and after this cycle it appears in the distance.