Is this a good idea? (preloading asset system)

But there are like hundreds of scripts in the game I can’t go into each one, find which one is using an asset and then do :WaitForChild, this is best option. Also this would probably increase performance.

I just meant like games which have tons of scripts and are very unotpimized, like if someone was hiirng for scripters and they all made many scripts and unoptimized code.

Yeah, I said any scripts outside of it. Like in startercharacter or workspace.

It’s not frequent, it happens once and is the first replicatedscript, and also I tested this in two big games and both worked perfectly fine and are even more optimized now. I was able to preload 100-200 assets and you can see the preloading visibily too.

You can’t do that if you have hundreds of scripts you can’t just go into each one and do waitforchild. Same thing with collectionservice, you really gonna add 100 tags? Plus even the documentation says adding tags can cause issues on performance so you need to remove them after aswell.

Yeah and I’m preloading assets into a game.

Have you not seen those errors in big games where it’s like “failed to load asset rbxasset:1491491404” that’s because it was never preloaded. Sometimes sounds can also play at the wrong time cuz they were never preloaded.

Actually the use of preloadasync is to yield(pause) a script until the assets are loaded. If I jsut did preloadasync in replicatedfirst and didn’t disable any scripts then there’s literally no use of preloadasync whatsoever as it would probably only likely be able to preload a few assets before the scripts run. I’m basically yielding the scripts until the assets have been preloaded like it’s suppose to.

Okay. I can’t disable server-scripts. okay.

TL;DR

It is your own fault for not using Instance:WaitForChild() in the first place. You instead used a more complex pathway instead of an easier solution. I am done with my argument here. If you are still going to give me the excuse “i can’t go into every single script and put wait for child in it”, I am done conversing with you.

Sounds like you did not make your scripts correctly in the first place. Why would you not use Instance:WaitForChild()? What are those scripts for anyway? Again, you are missing the purpose of this function which is to

Returns the child of the Instance with the given name. If the child does not exist, it will yield the current thread until it does. If the timeOut parameter is specified, this method will time out after the specified number of seconds and return nil.

Why are you handling the blame? It is obiously their mistake for not being able to code optimise and performance-friendly scripts in the first place. It is their job to ensure the scripts work well in a game, not yours.

Still don’t quite get your point here.

Again, this is a you problem for choosing to not use this function when you first make those scripts.

That has nothing to do with this topic currently.

Or maybe it’s because of privacy settings. You cannot play audios that are privatised.

Again, you are missing the point of :WaitForChild().

1 Like

Man I told you it’s not my game, I don’t know why the scripters didn’t do that themselves. why you gotta hate? :frowning:

Then it says that, but alot of the time that’s not the reason. If it’s privatized the coders would’ve already realised that and fix it easily.

it’s not my game its not my game its not my game its not my game i wasnt the one who didn’t use waitforchilds its not mine its not mine its not ine

Sounds like they didn’t learn the basics well. You shouldn’t handle the blame. Next time, hire or find an experienced scripter to help script the game for you. Make sure they are reputatble before they cause problems to you.

Have a good day/night.

Nah I was just gonna give it out as a community resource I guess.

Well I asked the guy hiring me if he wants a preloading system to fix alot of those types of errors and he said yeah and paid me so that’s why I made it, I wouldn’t make it for no reason anyway.