repeat
task.wait(1)
until #IsLands:GetChildren() == IsLandCount
Should I use like this?
repeat
task.wait(1)
until #IsLands:GetChildren() == IsLandCount
Should I use like this?
The game assets will load first, when using a server script.
Note that this isn’t true when using a local script.
That can be consuming on memory and isn’t good for performance, to figure out if assets are loaded you can use ContentProvider service. Here’s an example:
local ContentProvider = game:GetService("ContentProvider")
local LOGO_ID = "rbxassetid://658743164"
local PAGE_TURN_ID = "rbxassetid://12222076"
local decal = Instance.new("Decal")
decal.Texture = LOGO_ID
local sound = Instance.new("Sound")
sound.SoundId = PAGE_TURN_ID
local assets = { decal, sound }
ContentProvider:PreloadAsync(assets)
print("All assets loaded.")
I added a new example from the documentation because I thought it explained better.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.