#TextLabel being updated/marked as visible yet I can't see it?

1 messages · Page 1 of 1 (latest)

cyan robin
#

I made a code for a dialogue system for someone, but after I finished I realized I set up the script on a TextLabel, rather than an interactive part. I'm trying to set up the script so that it will run via the interactive part, and it does appear to be doing code, however I am unable to see it. I'm focusing on lines 12 through 14 right now, and checking the properties of each element I can see that they have been updated, but I just cannot see any of it. I'm definitely making a silly mistake and would really appreciate it if anyone knew how I could correct this!! ^^

local triggerpart = script.Parent.QwilProximityPrompt 
local dialogueText = {"Example text", "More than one example"} -- Add all dialogue here, separate each by commas
local noise = game.ReplicatedStorage.Sounds.QwilSound
local image = game.ReplicatedStorage.DialogueProfiles.QwilProfile
local dialogue = game.StarterGui.ScreenGui.Frame:FindFirstChild("Dialogue")
local index = 1
local connection

triggerpart.Triggered:Connect(function()
    triggerpart.Enabled = false
    
    dialogue.Visible = true
    dialogue.CharacterName.Text = "QWIL" -- Sets the name of the character speaking
    dialogue.CharacterProfile.Image = image.Image -- Sets the image of the character speaking

    for i = 1, #dialogueText[index] do
        noise:Play()
        dialogue.Text = dialogueText[index]:sub(1,i)
        wait(0.01)
    end

    wait(0.5)
    dialogue.Next.Visible = true

    if connection then
        connection:Disconnect()
    end

    connection = dialogue.Next.MouseButton1Click:Connect(function()

        index = index + 1
        if index <= #dialogueText then
            for i = 1, #dialogueText[index] do
                dialogue.Next.Visible = false
                noise:Play()
                script.Parent.Text = dialogueText[index]:sub(1,i)
                wait(0.01)
            end
            wait(0.5)
            dialogue.Next.Visible = true
        else
            dialogue.Visible = false
            triggerpart.Enabled = true
            index = 1
        end
    end)
end)
sour granite
#

The difference is, StarterGui is basically on where it will be stored, PlayerGui is where it will be shown

#

Think of it as StarterTools

cyan robin
#

OH I gotcha!! I knew it was something simple like that, I’ll fix it when I get home

fallen pecanBOT
#

studio** You are now Level 1! **studio

cyan robin
#

Thank you!

cyan robin
cyan robin
#

no, frame is a frame, but you're right that should be .ScreenGui.Frame, not .Frame

#

I'm still having an error with line 6 though

sour granite
#

try making it a :WaitForChild("PlayerGui") instead, since that shouldve worked

cyan robin
#

my brain is really fried right now I'm sorry if I'm making no sense LOL

sour granite
#
local player = game.Players.LocalPlayer
local playerGui = player.PlayerGui

this line shouldved worked fine on its own, not sure about you

cyan robin
#

keeps giving me this

#

hm

sour granite
#

That's odd

#

Wait a minute

#

Thats a serverscript

#

😭

cyan robin
#

I was just about to ask

#

LOL

sour granite
#
local player = game.Players.LocalPlayer

Won't work if its on a serverscript

#

💔

cyan robin
#

I gotchaa

#

should I convert this into a local script then? I'm not sure if it would mess with anything

sour granite
#

I don't really know since i dont even know what your making in the first place

#

But if your issue was on a local script

#

then oyu shouldve just changed StarterGui

cyan robin
#

This is how it was running when I had the script attached to the Gui, but I'm trying to move the script over to the interactive part so that it can be reusable