Hi. I have done some research on leaderstats and how to use them but when i use this script;
local ls = Instance.new("Folder", plr)
ls.Name = "leaderstats"
local moneyValue = Instance.new("IntValue", ls)
moneyValue.Name = "Money"
moneyValue.Value = money
while true do
wait (5)
moneyValue.Value = 100
end
It errors in the output (a different client script)
If there is any code under this it won’t run because the thread is in an infinite while loop.
You could put the while loop in it’s own thread by doing
task.spawn(function()
while true do
task.wait(5)
money.Value = 100 -- idk why you would make the value == 100 every 5 seconds, you should only update the value if the value is different than the old value
end
end)