How do you change the text of gui with a scring and then use , Script.Name

this may not make sense, but here’s the line (i have defined gui correctly):

gui.InfoText.Text = "The game has encountered an error. Information has been dumped in the discord server. You can send additional information in the tickets section. Script:"

after the string, i wanna add the script name. how do i do this?

gui.InfoText.Text = "The game has encountered an error. Information has been dumped in the discord server. You can send additional information in the tickets section. Script:".. script.Name

i tried to put , but it errored.
image

you need to do it like this

label.Text = "This is the text of "..script.Name
--use " .. " to concatenate

why can’t i use ,?
charrrrrrrrrr

because you’re setting text

Button.Text = "Text is", "nice."
--"Text is" & "nice." are two values because ' , ' didn't combine them

giving two strings is trying to set two values which is why you need to concatenate

thanks to both people who replied!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.