I am trying to use insert service to insert a folder of IDs into my game. These IDs change periodically and thus the game needs to continually have the most recent set of audios IDs. This works absolutely perfect in studio whatsoever but when it comes to joining in my game from the roblox website, it doesn’t work.
My code on a server sided script:
while true do
task.wait(3)
local InsertService = game:GetService("InsertService")
--
local success, model = pcall(InsertService.LoadAsset, InsertService, 9166284874)
if success and model then
print("Model loaded successfully")
model.Parent = game.Workspace
model.Name = "FOOOLLLDDDEEEEERRRr"
--
local ID1 = model:GetChildren()[1]:GetChildren()[1]
print(ID1.Value, " | ", model:GetChildren()[1]:GetChildren()[1].Value)
--Print the most recent ID.
model:Destroy()
else
print("Model failed to load!")
end
end
Video showing it working in studio just fine:
Video showing it NOT working in game like it SHOULD:
I’ve waited much longer in time to see if it would have any delay and change than in the second video but it never changed.
Script to test for yourself: (you must make your own model of “Folder”)
Insert Service.rbxm (1.4 KB)
Why is this happening and how can I fix this problem?