I recently posted a similar script about a day ago and someone helped, but this script isn't working either and I can figure it out. I've experimented with it and can't figure it out. Please help, thank!
game.Players.PlayerAdded:Connect(function(player)
local stats = Instance.new("Folder")
stats.Name = 'leaderstats'
stats.Parent = player
local cash = Instance.new("IntValue")
cash.Name = 'Cash'
cash.Parent = stats
local part = workspace.B
while part.Transparency == 0 do
wait(2)
cash.Value = cash.Value + 25
end
end)

2 comments
How exactaly it don't works?
Try this one my dude print("Cash Leaderboard Loaded") function onPlayerEntered(newPlayer) local stats = Instance.new("IntValue") stats.Name = "leaderstats" -- Do not change this local cash = Instance.new("IntValue") cash.Name = "Cash" -- Name of Currency. cash.Value = 1000 -- Amount each player who enters, get. cash.Parent = stats stats.Parent = newPlayer end game.Players.ChildAdded