I was just testing things out, but on the last line print(xPosition), it is printing 'nil', how do I prevent that from happening?
local xPosition
local AmountOfCash
local corouti = coroutine.create(function()
while wait() do
AmountOfCash = Player.leaderstats.Cash.Value
end
end)
coroutine.resume(corouti)
local genRandomNumber = coroutine.create(function()
while wait() do
xPosition = math.random(0.200, 0.500)
end
end)
coroutine.resume(genRandomNumber)
print(xPosition)
