I have a GUI showing text of a person talking, and some of the words get cut out (trailing off the screen) for no apparent reason. I checked my code about 3000 times and I am yet to find any error.
Code:
local dialogueGui = game.StarterGui.dialogueGui
local textLabel = script.Parent
local function dialogueText(object,text)
for i = 1,#text,1 do
object.Text = string.sub(text,1,i)
wait(0.025)
end
end
local userInputService = game:GetService("UserInputService")
dialogueText(textLabel, "I am unsure of why some of the words get cut off.")
When I run the code, it shows this:
"I am unsure of why some of the words g (the rest of "get" trails off the screen) cut off."
Thank you for your help!

2 comments
Make sure the Scale value on the X, and Y part of the text label is set to 1, and the Offset values (both X, and Y) are set to 0.
I fixed it by just moving it to the left, apparently in studio it is offset to the right a little bit, but I fixed it. thank you