Player:PromptOpenURL(string url)

Hi there!

I had an idea for a function (intended for LocalScripts) that allows a script to prompt a player to open a url on their default browser. The url, obviously, would have to be from a list of whitelisted domains (most likely just roblox.com)

For example, if you did…
player:PromptOpenURL("https://www.roblox.com/Purple-Bow-Tie-item?id=16598444")

… the player would be prompted (with a dialog similar to the purchase ui) to open the specified link in their default browser.

A case where this could be useful is, for example, Trade Hangout. With this feature, Merely could allow users to easily open catalog pages for limited items from within the game.

It could also be used to refer someone to a group, forum post, game, etc.

30 Likes

Should also work for allowed domains (I.e. Twitter - “Click here to follow me on twitter for in-game codes!”)

3 Likes

I considered that the feature might be very useful for Twitter. An issue I see, however, is that some content on Twitter could be inappropriate. (Or perhaps I’m wrong?)

1 Like

If it’s allowed on the site, it’s allowed in-game. People can click a report button in the prompt if it’s an inappropriate tweet like they can on the site. Legitimate uses of a feature shouldn’t be disregarded for something that won’t make ROBLOX safer.

2 Likes

Cool feature, but still need to solve:

url = "..."
while true do
   player:PromptOpenURL(url)
end

Or if only the same link is allowed once, how do we solve something like:

url = "..."

function randAppendix()
   s = "?ignoredparameter="
   for i=1,10 do
      s = s .. math.char(math.random(97,122)) -- add an a-z
   end
   return s
end

while true do
   player:PromptOpenURL(url..randAppendix())
end

Maybe a limited amount of requests per minute/hour?

No we don’t. If some game does that, people can just leave – it’s not like it prevents the menu from opening. It’s no different from someone spamming with PromptPurchase. Even if we ignore PromptPurchase, the tradeoff of annoying people who want to legitimately open links in a short timeframe to hinder such a rare edge case that’s not even much of a problem to begin with is a bad idea.

3 Likes

Here’s a thread I made in S&I about this a few years ago.
Got quite a lot of support, most of the bugs in the design are ironed out with suggestions by page three.

http://forum.roblox.com/Forum/ShowPost.aspx?PostID=152102722

I agree. I could see a major use case of this being a button. i.e. “Click here to join my group!”. It would not make sense for a user to have to wait a cooldown period to use the button again.

Google fixes this in Chrome via a checkbox to prevent additional dialogs.

2 Likes

This doesn’t happen on IE which is frustrating

Roblox actually has this functionality built in, but its locked down.

3 Likes

No, it doesn’t. That function has a very different purpose.

Last time I checked, it was being used in the PromptPurchase CoreScript to open the robux purchase page if the user didn’t have enough to purchase something.

Then again, I might be wrong.

EDIT: Actually I think I might be right.

1 Like

I made a thread about this a while back. They reviewed the idea but I assume it was scrapped.

1 Like

Please

1 Like