Hi!
I am currently working on a new game sort of like Habbo Hotel but 3D. A place to hangout and chat.
I need a script to SAVE my leaderboard stats called "Funds", the cash you earn every 2 minutes or have purchased with ROBUX. Here is my script that I am currently using.
print("Income Leaderboard Initialized")
function onPlayerEntered(newPlayer)
local stats = Instance.new("IntValue")
stats.Name = "leaderstats"
local stats1 = Instance.new("IntValue")
stats1.Name = "Funds"
stats1.Value = 100
local stats2 = Instance.new("IntValue")
stats2.Name = "income"
stats1.Parent = stats
stats2.Parent = newPlayer
stats.Parent = newPlayer
while true do
wait(120)
mins.Value = mins.Value + 10
end
end
game.Players.ChildAdded:connect(onPlayerEntered)
I have searched free models for examples of leaderboards I coulld start with but none work. (And yes I do change the stats name and cash names)
If you could find or make one and set it up with my leaderboard that would be much appreciated.
Please point out any flaws in my script too.
Thanks
-Mapyo |