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

Why did this script break when it worked before?

Asked by 10 years ago

This script worked before but wont work now. I have no clue why.

a = game.Players.LocalPlayer.PlayerGui.Hacker.Frame

function clicked()

    local text = "<EoF";
for i = 1,#text do
    a.Mes1.Text = text:sub(1,i);
    wait(0.1);
end

    wait(1.5)
    local text = "LOADING LOCAL_COMPUTER_DATA";
for i = 1,#text do
    a.Mes2.Text = text:sub(1,i);
    wait(0.1);
end

    wait(1.5)
    local text = "HARD_DRIVE";
for i = 1,#text do
    a.Mes3.Text = text:sub(1,i);
    wait(0.1);
end

    wait(1.5)
    local text = "MONITER_FRAME";
for i = 1,#text do
    a.Mes4.Text = text:sub(1,i);
    wait(0.1);
end

    wait(1.5)
    local text = "FIREWALL_SECURITY";
for i = 1,#text do
    a.Mes5.Text = text:sub(1,i);
    wait(0.1);
end


script.Parent.MouseButton1Down:connect(clicked)
end

1 answer

Log in to vote
1
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
10 years ago

You should tab your code properly. That would reveal the problem.

Your connection line is inside the function definition, meaning it never would be called, and so the function is never connected to the event.

Ad

Answer this question