I was wondering if there was a better way to do this. I was looking at the GetPropertyChangedSignal and IntValue.Changed.
local plr = game.Players.LocalPlayer -- self explanatory
local statss = game.ReplicatedStorage:FindFirstChild("Stats") -- finding the folder holding stats
local folder = script.Parent.Main.values -- opening the folder containing the text inside the gui
function update()
wait(1)
local stats = statss:FindFirstChild(plr.Name) -- finding the players stat folder with their username
for i,v in pairs (folder:GetChildren()) do
v.Text = v.Name..": ".. tostring(stats:WaitForChild(v.Name).Value) -- grabbing the stats and text inside gui and changing it
end
end
while wait(1) do -- this is the main part I was wondering about
update()
end
If there is an entirely better way to do this, let me know please. Still learning.
