Slim
Slim

Reputation: 5975

How to display a popup message in Roblox game mode?

I'm trying to parse chat messages for keywords that I will use to trigger various functions. In order to use the chat I have to test in game mode, which is started by first clicking Tools-> Test-> Start Server and then clicking Tools-> Test-> Start Player. The command window is not available in game mode so I need a way to get some debugging feedback. I figured a popup message would be good for that purpose.

I suspect its fairly simple to display a popup message but I cant find any information on it.

Upvotes: 0

Views: 9211

Answers (7)

GlitchMasta47
GlitchMasta47

Reputation: 1

ROBLOX has actually added a developer console (see it at the wiki: wiki.roblox.com/index.php?title=Developer_console) to the game client AND added its availability to studio 2015. You can access using the f9 button (or alt+f9 on laptops). You could've also opened the output window (see it at the wiki: wiki.roblox.com/index.php?title=Output) and see the errors there. Hope this helped!

Upvotes: 0

ZombieSpy
ZombieSpy

Reputation: 1376

There are some ways you can achieve this.

  1. Roblox recently added a developer console that you can also use in game, so basically you can see the output window even online.
  2. You can use Messages or Hints
  3. You can make your own GUI
  4. If you don't need it online, you can use the output window.

Upvotes: 0

Pratik Somaiya
Pratik Somaiya

Reputation: 818

native.showAlert(parameters list)

This can be best way to implement.

Upvotes: 0

blacksmithgu
blacksmithgu

Reputation: 81

While the following answers are of course correct, you CAN create a popup to display output from the...output. This can be done by overriding the default "print" function:

_G["dprint"] = _G.print
_G["print"] = function(...)
   pargs = {...}
   lMessage = Instance.new("Message")
   lMessage.Parent = workspace
   lMessage.Text = table.concat(pargs, " ") -- Is it concat?
   wait(10)
   lMessage:remove()

end

Upvotes: 0

bigbrainkid
bigbrainkid

Reputation: 1

to see the output, go into the server window, and make sure the output window is shown.

Upvotes: 0

James T
James T

Reputation: 3320

Enable the output, Press Test >> Start Server In that new window press Test >> Start Player In the server window (Not the new player window), open the command bar and type:

game.Players.Player.SuperSafeChat = false

And press enter. You can test it, and get output.

Upvotes: 0

jitter
jitter

Reputation: 54605

Did you enable the Output window?

View -> Output menu

Then e.g. if you script does

print("Hello world!")

You should see that in the output window. Else take a look at

How to add messages

Upvotes: 3

Related Questions