local Players = game:GetService("Players")
local ThisPart = script.Parent --make sure the parent is a part
function Check()
for i, player in pairs(Players:GetPlayers()) do
local Character = player.Character or player.CharacterAdded:Wait()
local RootP = Character:WaitForChild("HumanoidRootPart")
local Dis = (ThisPart.Position-RootP.Position).magnitude --Checks the part/region block's position (you can change "ThisPart" to whatever name you want)
if Dis <= 10 then --if player is close then they get money!
print("Player is near!")
end
end
end
game:GetService("RunService").Heartbeat:Connect(function()
Check()
end)
I got to this with my last post, but no clue how to make it give money it print's whenever a player is near but I want it to give 40 gold every minute
I have a script that creates a folder, name's it leaderstats, and add's a value named gold, so essentially I would wan't that to increase every minute if the player is in the distance.

2 comments
Perhaps you could add a while loop with a 60 second wait() as soon as the player is in the right distance? That might just work.
if Dis <= 10 then Character.leaderstats.Money.Value = Character.leaderstats.Money.Value + number