Hey! I was making a selection UI for a game and I ran into this problem where my ui is getting the value before its loaded by the data store, I was wondering if theres a way to wait for it to load the value? I also tried using a repeat untill but it doesnt work.
(Heres my code if maybe I did something wrong.)
local Slots = game.Players.LocalPlayer:WaitForChild("TrollSlots")
for i,v in Slots:GetChildren() do
local NewSlot = script.Parent["0"]:Clone()
NewSlot.Visible = true
NewSlot.Name = string.char(i)
local Name = v.Value
NewSlot.Parent = script.Parent.loading
NewSlot.TextLabel.Text = "Slot "..i.." - "..Name
end
task.wait()
for i,v in script.Parent.loading:GetChildren() do
v.Parent = script.Parent
end
Again, Im just asking if theres a way to wait for it to load.
It's meant to say the value in the slot ("Troll") like "Slot # - Troll"
