Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I'm not quite sure what's the error in this dialogue script?

Asked by 3 years ago
Edited 3 years ago

I made a GUI and inserted this local script into the screen GUI. I tested the script but it doesn't appear to work. I check the script but nothing is underlined, nor does the output show errors. However, it does say an infinite yield is possible on players though I cannot catch the error.

Script:

local textLabel = script.Parent:WaitForChild("Main"):WaitForChild("Text")

local function typeWrite(object, text)
    for i = 1,#text, 1 do
        object.Text = string.sub(text,1,i)
        wait(0.05)
    end
end

typeWrite(textLabel, "Hi, this is a test")
0
you can place code in a code block (last button on top of the ask a question thing) NGC4637 602 — 3y

Answer this question