Hello!
I am making a save code for a building game. But, when it loads, it takes a while to wait() hundreds of blocks. I was wondering, is there anything that would be quicker than wait()?
script
for i, v in pairs(data) do
workspace.WorldData.LoadedValue.Value += 1
local newdata = data[i]
local pos = Vector3.new(newdata[2] , newdata[3], newdata[4])
local name = newdata[1]
if game.ReplicatedStorage.Library:FindFirstChild(name) then
local obj_fHNbx =game.ReplicatedStorage.Library:FindFirstChild(name)
local clone = obj_fHNbx:Clone()
clone.Parent = workspace .World
if clone.Name == "WoodenSign" then
clone.Handle.Text. UI.Text.Text = newdata[5]
end
if clone.Name == "SmallSize" then
clone.PrimaryPart = clone.model.SmallSize
else
wait()
end
clone:SetPrimaryPartCFrame(CFrame.new() + pos )
wait()
else
print("Error while loading world")
end
end