Hello everyone, I have problem with money from outpost. When player capture outpost receive every 5 sec +10 money, but can't use in tycoon to buy something... Someone said i should use RemoteFunction, but idk how im still newbie in scripting.
Here is script which giving money(Maybe help some):
local paymentAmount = 10
local paymentPeriod = 5
local owner = script.Parent.CurrentOwner
local neutral = script.Parent.NeutralColor
local payoutVersion = 0
function StartPayingOut ()
if owner.Value == neutral.Value then payoutVersion = 0 return end
payoutVersion = payoutVersion + 1
local curVersion = payoutVersion
while curVersion == payoutVersion do
for _, player in ipairs(game.Players:GetPlayers()) do
if player.TeamColor == owner.Value and player:FindFirstChild("leaderstats") and player.leaderstats:FindFirstChild("Cash") then
player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + paymentAmount
end
end
wait(paymentPeriod)
end
end
owner.Changed:connect(StartPayingOut)
Probably it's request, but i don't know how to make it work perfectly... I'm using berezaa tycoon kit and i already read some about RemoteFunction in Roblox wiki, but i don't understand...

4 comments
The tycoon is probably not using the same leaderstat value, it may be using "Money" or some other name. Change it to "Cash" if it's not already.
I'm using "Cash" value. In script it's invoke to leaderboard, which already exist.
Dude, don't put dev infront of your name if you use freemodels it makes you a noob because clearly you can't script .-.
Free models? In my game i created everything -.- so shut up... Im beginner in scripting ;s If you don't want to help please stop writing comments like this one.. If i need help then im writing here, if you don't know what is for this site.