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

Repeat until loop issue?

Asked by 8 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

Okay so I have a script that checks to see if a player's team is a customer or staff and if it's a customer, it will make the surface GUI screen visible. The script below me used to check once because the player gets to choose their team so they are placed on a starter team("Choosing Team"). So then I added a repeat until and that sort of worked but it keeps making the start menu visible when I click the next button on my surface gui.

plr = game.Players.LocalPlayer

repeat 
if plr.TeamColor == BrickColor.new("Lily white") then
    script.Parent.Wrong.Visible = true
    script.Parent.Start.Visible = false
elseif plr.TeamColor == BrickColor.new("New Yeller") then
    script.Parent.Start.Visible = false 
    script.Parent.Wrong.Visible = true
elseif plr.TeamColor == BrickColor.new("Persimmon") then
    script.Parent.Start.Visible = true
    script.Parent.Wrong.Visible = false 
end
wait(1)
until plr.TeamColor == BrickColor.new('Persimmion')

This is a LocalScript with no errors in the output.

0
Please explain in more detail? I don't understand DevNetx 250 — 8y
0
Edited. BennyBoiOriginal 293 — 8y

Answer this question