Model:HasLoaded()

When using FE and inserting a large map on the server, people with poor internet lags.
There needs to be a way to check if everyone has loaded the map, Model:HasLoaded() seems like a decent function to add.

Having the maps in RStorage and loading em piece by peice is not an option when dealing with large maps.

5 Likes

Yes!
Players are being sent to maps, but fall through them if they haven’t fully loaded them.

I tried using WaitForChild on the map via server script but to no avail.

Agree. We also have this issue in Deathrun. Still, since the map gets replicated it should be a local function. Since basically you are checking or the map has been replicated to the clients, not or the server has fully loaded the map in question.

1 Like

This is not the best way to implement such a feature. Two new methods and an event should be added to ReplicatedStorage.

Methods
[ul]
[li]ReplicateAsync(Instance Player, Instance) - This would yield until the instance had been replicated to the client. It could be used to share an instance that only that client.[/li]
[li]Replicate(Instance Player, Instance) - This would replicate an instance to the client without yielding, when the replication is completed the Replicated event is fired. This would be useful for replicating maps.[/li]
[/ul]

Events[ul]
[li]Replicated - This would be fired when an instance that has been replicated by the replicate method has finished replicating.[/li]
[/ul]

You mean like this from 8 months ago? Me too, OP, me too.

Its not about preloading assets, its about knowing if a new model, purposely not preloaded due to its size, has been loaded or not.

Its not about preloading assets, its about knowing if a new model, purposely not preloaded due to its size, has been loaded or not.[/quote]

If you read the post, you’d notice it’s not about pre-loading an asset. it’s about making sure an Instance has loaded. That’s literally the reason it says Preload::Instance and that we can’t pre-load an Asset.

Sure, but ::HasLoaded() is a stupid way to go about it.

There should really just be a .ReplicatedServer/Client event for all instances. But if you insist it must be models only, you can simply have a .Loaded event.

There is absolutely no need for a function that simply returns true or false and does literally nothing else. The API looks just plain silly at that point.

Its not about preloading assets, its about knowing if a new model, purposely not preloaded due to its size, has been loaded or not.[/quote]

If you read the post, you’d notice it’s not about pre-loading an asset. it’s about making sure an Instance has loaded. That’s literally the reason it says Preload::Instance and that we can’t pre-load an Asset.[/quote]

The lag is not created by the map not being preloaded.
If you have a large map in ReplicatedStorage, it’s technically preloaded since it’s on the client. Try put that in workspace in one sweep see how well that goes.

[quote] Yes!
Players are being sent to maps, but fall through them if they haven’t fully loaded them.

I tried using WaitForChild on the map via server script but to no avail. [/quote]

In all of your maps name your spawn points [tt]“CriticalPart_.”[/tt] On every client have some ::WaitForChilds with a little string manipulation and notify the server when they’ve loaded, and only then teleport the player.

Better yet, when you save your maps, put the total number of instances the map contains in an IntValue inside the map. Wait for the value object, then when the loaded instances equal the value, notify the server.

[quote]
Better yet, when you save your maps, put the total number of instances the map contains in an IntValue inside the map. Wait for the value object, then when the loaded instances equal the value, notify the server. [/quote]

^ Dats the smartest thing I’v heard all day.
Thank. You. SIR!

Why not just tell the client how many parts are in the map, and make the client inform the server when it has that many items in the model? (Make a recursive method for children depth)

Best you do it my way. It’s the smartest thing that’s been said all day.