Hey guys, I need help on making an Ad Cash GUI. The ad worked and showed up on mobile, but the promised reward of 5000 cash wasn't awarded. I am using berezaa's tycoon kit. I do not know what is wrong with the script. What is wrong with it? Can someone fix it?
function run()
game:GetService("AdService"):ShowVideoAd()
game:GetService("AdService").VideoAdClosed:connect(function()
print("Finished showing video ad.")
stats=game.ServerStorage:WaitForChild("MoneyStorage")
if stats~=nil then
currency = stats:WaitForChild(Player.Name)
if currency~=nil then
bonus=script:WaitForChild("AdCash")
currency.Value = currency.Value+bonus.Value
end
end
end)
end
script.Parent.TouchTap:connect(run)
UPDATE : I edited the script line 10. The script line content is now "bonus=script.Parent:WaitForChild("AdCash")"

2 comments
I added it and replaced some lines of code, I will try it later on the mobile version of ROBLOX. Thanks!
If it worked or helped accept my answer :D