So I have very simple line of code but it errors each time.
I’ve already tried to add wait until game.IsLoaded stuff and similar things like that.
Turns out if I add specifically wait(1) before everything it works fine, but still giving me the same error sometimes
I assume that it’s because the workspace doesn’t get enough time to replicate to the client, but how do I wait for it instead of adding wait(n)?
local BlockUpgradesFrame = workspace.Block.BlockUpgrades.Screen
The WaitForChild is primarily used while the game is still loading or you summon new instances that take a few milliseconds longer to load in than the code runs.
Once the wait time to find the child has finished, there’s a good chance that all the other instances have already loaded, so you do not have to use it for that path anymore.