I’m trying to create a serverlist for my game, but it doesn’t work when another server is active, giving me the error ‘The parent property of Template is locked, curent parent: NULL, new parent Holder’ although when I researched the error, I found nothing that helped me. The system works like this: Checks for running servers from a folder which provides the data, sends it to the client, and loads all of the servers and their data under the list. It deletes the outdated frames and replaces them with new frames with the proper data. NOTE: When I only set the Frame’s parent to nil, the script proceeds as per usual. When I delete it, it doesn’t. PROBLEM LINES:
for i,v in pairs(ServersList:GetChildren()) do
if v:IsA("Frame") then
v.Parent = nil
v:Destroy()
end
end
for i, Server in pairs(ServerFrames) do
Server.Parent = ServersList
end
Why are you trying to set the parent of a destroyed object?? The .Parent property gets locked when you call destroy because you are deleting it from memory.