I thought originally it was things loading to quick but after adding a :WaitForChild() I got an infinite yield.
Here’s the code.
if not newTemplate:FindFirstChild("Reference") then
local ref = Instance.new("ObjectValue")
ref.Name = "Reference"
ref.Parent = newTemplate
end
newTemplate:WaitForChild("Reference").Value = player
newTemplate.Parent = leaderboardContainer
newTemplate.Frame.Title.Text = player.Name
newTemplate.Frame.Title.Text = player.Name
This line right here is the issue, as you can see above:
if not newTemplate:FindFirstChild("Reference") then
local ref = Instance.new("ObjectValue")
ref.Name = "Reference"
ref.Parent = newTemplate
end
I was having this issue with the an object value.
It’s cloning a template which contains all of these things yet there’s times where it doesn’t exist? I don’t get it.