#Need assistance editing some code (not sure how to describe it without it being long)

1 messages · Page 1 of 1 (latest)

sharp yarrow
#

So, I found this Undertale-style text function which is PERFECT for my game, but I'm just having some difficulty properly using it. The example script it gave is the file attached. I want to be able to just run code like this just when a function is ran, without it waiting for the player to say something or interact with a proximity prompt (which I've got working before), but when I placed this code in a LocalScript, it didn't work. Please help!

Here's the code I want to run inside a LocalScript by itself:

local dialogue = {
    lines = {
        "You swing your blade with all your might.",
        "Pair of Halves takes 10 damage."
    }, 
    config = {
        lines = {
            ["1"] = {
                Persistent = true,
                colors = {
                    ["1"] = Color3.fromRGB(255, 255, 255)
                },
                sounds = {
                    ["1"] = game.SoundService["DefaultTextSound"],
                },
                speeds = {
                    ["1"] = 0.02
                },
                effects = {
                    ["1"] = "normal"
                },
                fonts = {
                    ["1"] = "DefaultFont",
                }
            },
        }
    }                    
}