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

What's wrong with this script?

Asked by 9 years ago

No errors in the dev tool. When I team myself to the awayteam, my name doesn't show up on the textlabel t1. The text is not there at all, so it is not an issue with updating my playergui. Help?

01local bench = game.StarterGui.InfoGui.Frame.ABenchP
02local hometeam;
03local awayteam;
04function GetHome()
05    for i, v in pairs(game.Teams:GetChildren()) do
06        if v:findFirstChild("home") then
07            return v
08        end
09    end
10    return nil
11end
12 
13function GetAway()
14    for i, v in pairs(game.Teams:GetChildren()) do
15        if v:findFirstChild("away") then
View all 47 lines...

1 answer

Log in to vote
7
Answered by 9 years ago

At line 27, you start an infinite loop that prevents the for loop at line 42 from running.

0
So what do I do with the loop? Ethan_Waike 156 — 9y
2
Just delete the "while true do" at line 27 and the end at line 40 LetThereBeCode 360 — 9y
Ad

Answer this question