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)
Hey, I noticed a fairly simple issue with your script. When you're defining the local part, you must have an exact location, not just a simplified version. I redid the script and made a working version of the game here, with copying on. Or you can view the script as:
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 = game.Workspace.B while part.Transparency == 0 do wait(2) cash.Value = cash.Value + 25 end end)