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

My game keeps printing stuff for no reason?

Asked by 4 years ago
Edited 4 years ago

Hi there! I'm trying to create a system that when someone's partial name is entered, the text will light up. I've been printing stuff to see what it's doing, but it keeps printing the same thing:

--

My code:

while wait() do
    local text

    if playerGui:WaitForChild("TicketGui").MainFrame.MainFrame.UserBox.Text ~= text then
        print("text changed")
        text = playerGui.TicketGui.MainFrame.MainFrame.UserBox.Text
        print(text)
        if findPlayer(playerGui.TicketGui.MainFrame.MainFrame.UserBox.Text) and playerGui.TicketGui.MainFrame.MainFrame.UserBox.Text ~= "" and playerGui.TicketGui.MainFrame.MainFrame.UserBox.Text ~= " " then
            print("found player")
            playerGui.TicketGui.MainFrame.MainFrame.Submit.TextTransparency = 0
        else
            playerGui.TicketGui.MainFrame.MainFrame.Submit.TextTransparency = .5
        end
    end
end
0
I checked all the referencing, it's correct. No errors as well Also, it's only the spot where it's told to print the text where it prints "--". ParticularlyPenguin 71 — 4y

Answer this question