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?
Ads can only be played on mobile devices. Since mobile devices do not have computer mice, the onClicked function will not work. Replace the ClickDetector with something like a Touched event.