It's meant to show a Video Ad and give the player his reward, but nothing happens... Help? No output too...

debounce = false
script.Parent.Touched:connect(function()
	if debounce == false then
		debounce = true
		game:GetService("AdService"):ShowVideoAd()
	end
end)
game:GetService("AdService").VideoAdClosed:connect(function()
	local a = math.random(1,10)
	game.Players.LocalPlayer.stats.Cash = game.Players.LocalPlayer.stats.Cash + a
	game.Players.LocalPlayer.PlayerGui.ScreenGui.Notice.TextButton.Text = "You have earnt "..a.." Cash from the Video."
	wait(60)
	debounce = false
end)

I'm fairly certain that it's LocalPlayer.stats. Those stats aren't meant to be visible to anyone but the player.

4 comments

0

Try adding a few print statements to see if the code is ever actually running.

0

Still. I put "Brick Touched" Right after the event and not even THAT would print...

0

Are you on a mobile device? Video Ads only show if you're on a mobile device.

0

Thanks for the obvious, Merely. I have tested it on all platforms and nothing. It would be nice to have a developer console on Mobile though