Title says it all... Here's the script:
script.Parent.Touched:connect(function(hit)
humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid ~= nil then
hit.Parent.leaderstats.Cash.Value = hit.Parent.leaderstats.Cash.Value +script.Parent.Cash.Value
script.Parent.Cash.Value = 0
end
end)
Output: 20:26:36.266 - leaderstats is not a valid member of Model 20:26:36.268 - Script 'Workspace.Model.ToCollect.Script', Line 4 20:26:36.269 - Stack End 20:26:36.270 - Disconnected event because of exception

1 comment
Naa, Wrong thing. It's not continuous every 5 seconds. Its when a player touches a brick, the brick has a value, That value adds to the leaderstat AND that value get reset to 0. and Yes, there is a "Cash" IntValue in "leaderstats"