function onClicked(playerWhoClicked)
game:GetService("AdService"):ShowVideoAd()
game:GetService("AdService").VideoAdClosed:connect(function()
print("Finished showing video ad.")
end)
I have this as a local script inside of a part. There is also a click detector inside of the part. However, ROBLOX keeps saying that there are unexpected things and such. I just want to be able to make it so that a mobile ad will play when the brick is clicked. Can anyone help me out?

1 comment
Include the error. There's a syntax error in at least this snippet that you posted; include it in the question.