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:
https://ibb.co/kQ7FmNM
"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!
Apparently in Studio all the GUIs are offset to the right by a little bit, because the offsets were both 0, but when I ran the game it was moved to the right. I fixed this by simply moving the GUI to the left.