I want it to appear on my leaderboard but I have a group rank script too and when I add this script the rank script becomes blank
game.Players.PlayerAdded:connect(function(p) local stats = Instance.new("IntValue", p) stats.Name = "leaderstats" local money = Instance.new("IntValue", stats) money.Name = "Cash" money.Value = 0 while true do wait(80) money.Value = money.Value + 50 end end)
And here is the group script that doesn't work when I use the money script
local playerStats = {} game.Players.PlayerAdded:connect(function(player) local leaderstats = Instance.new("Model", player) leaderstats.Name = "leaderstats" local grouprank = Instance.new("StringValue", leaderstats) grouprank.Name = "Rank" local rank = player:GetRoleInGroup() --My group if rank ~= 0 then grouprank.Value = rank else grouprank.Value = "Guest" end playerStats[player] = leaderstats end)
For some reason both scripts work once in studio and then they stop working