Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
3

Which is the best way to load every object in the game? [closed]

Asked by
valchip 789 Moderation Voter
5 years ago
Edited 5 years ago

I would like to hear your opinion!

My opinion is to use :WaitForChild.

Example:

local part = workspace:WaitForChild("Part")
local part2 = workspace:WaitForChild("Part2")
local part3 = workspace:WaitForChild("Part3")

if part then
    if part 2 then
        if part 3 then
    print("Objects Loaded")
end

--btw the parts are supposed to be in ReplicatedStorage and be loaded by a script
--the only reason why I put all of those in an if statement and did not check the parts seperately is that the scripts run from the top to the bottom and cause it saves time.

Another way I know is that you put all the objects in the workspace and just change their CFrame to the position you want.

Let me know what do you think the best way is.

Closed as Primarily Opinion-Based by theCJarmy7, Leamir, and User#19524

This question has been closed because it is a discussion about a topic focused on diverse opinions, which isn't a good fit for our Q&A format.

Why was this question closed?

1 answer

Log in to vote
1
Answered by
Leamir 3138 Moderation Voter Community Moderator
5 years ago

Hello, 3chars20!

For me, it's create a folder on Server Storage and use a for loop to change the Parent of the Parts

Like:

for i,v in pairs(game.ReplicatedStorage.ToLoad:GetChildren()) do
    v.Parent = game.Workspace
end

This would move everithing from the folder ToLoad from replicated store to the workspace

Hope this helps

Good Luck with your games!!!

0
That is a really nice method!! valchip 789 — 5y
0
I know, you can also filter for parts using this method Leamir 3138 — 5y
Ad