[CLOSED] Need help making a Textbox that shows output in-game

Hey I’m Lastborn and I’ve been learning scripting for a while, I’m very new and can only code basic stuff but recently I tried to make a floating textbox that will show what is printed in the output; does anyone know how I would go about doing this, or is it just not doable.
image

I’m not asking you to write the code for me, maybe just some advice. Thanks :slight_smile:

Use LogService.MessageOut:
https://developer.roblox.com/en-us/api-reference/class/LogService

1 Like

Use LogService and LogService.MessageOut. Maybe it’s not up to date but should work fine. If you want the history you use LogService.GetLogHistory.

1 Like

Thanks, looks like what I needed!

I kind of tried something stupid just out of curiosity…
local output = game:GetService(“LogService”)

script.Parent.Text = output
pretty bad ngl… can you give me some advice on how I could build onto this?

example :

local msg = Instance.new("Message", workspace)
Game:GetService("LogService").MessageOut:Connect(function(Message, Type)
    msg.Text = "The message was "..Message.." and the type was "..tostring(Type)
end)
 
print("Hello, World!")

https://developer.roblox.com/en-us/api-reference/event/LogService/MessageOut

1 Like

Try something like this:

local LogService = game:GetService("LogService")

LogService.MessageOut:Connect(function(Msg, Type)
    script.Parent.Text = tostring(Msg)
end)

Dang, @ayoub50 beat me.

2 Likes

Nice scripting :slight_smile:
Are there any properties I should edit in the billboard UI or the textbox UI in order to make it work?

all you have to do is put your textlabel’s spot into there.

local YourTextLabelSpot = --- put your textlabel here
local LogService = game:GetService("LogService")

LogService.MessageOut:Connect(function(Msg, Type)
    YourTextLabelSpot.Text = tostring(Msg)
end)
2 Likes

No, where is your script located and what kind of script is it

1 Like

image

Well, it should work, are you printing from server or local scripts (not sure if that matters)

1 Like

I just fixed it, thank you everyone for your time and helping me :smiley:

2 Likes

No problem, glad you found the solution. Make sure to mark it as solution

1 Like

Btw when you took the code from my reply and added the variable for the TextLabelSpot, you forgot to change script.Parent.Text to YourTextLabelSpot.Text

2 Likes

oh haha, that sounds like something I’d do

oh yes i fixed that part, ty for informing me