I am working on a paying script, and I am trying to make it so that it pays and takes the right amount of money every 5 seconds. I have 3 values, Giver, Getter and Amount. Is there a special way to do math with a value because this didn't work:
local giver = game.Players:FindFirstChild(script.Parent.Giver.Value)
local givermoney = giver.leaderstats.Tuncidunt.Value
local getter = game.Players:FindFirstChild(script.Parent.Getter.Value)
local gettermoney = getter.leaderstats.Tuncidunt.Value
local amount = script.Parent.Amount.Value
while true do
givermoney = givermoney - amount
gettermoney = gettermoney + amount
wait(5)
end
Can anyone help?
