Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Teams Name Help?

Ok so here is my script

local teams = game.Teams
frame = game.StarterGui.Jobs.TeamMain
if teams.Name == "Teacher" then
	while true do
		frame.Visible = false
		wait(0.5)
	end
end

now I want it to check for the team name and if it is that name of the job as shown here Teacher it wont open the job chooser frame again even when the die?

1 comment

0

Im pretty sure my problem here is that I dotn really have the name and Im declaring a folder im thinking about classnames perhaps

1 answer

✓ Accepted answer

You are saying that the Service, 'Teams' has a name. In order to fix this do:

local teams = game.Teams
frame = game.StarterGui.Jobs.TeamMain
local b = teams:GetChildren()-- You have to grab all of the teams before checking for the name
for i=1,#b do -- A loop for the amount of teams
	if b.Name == "Teacher" then
	while wait(0.5) do -- If you would like to shorten it a bit, you can replace the 'true' with 'wait(0.5)'
	frame.Visible = false
	end
end
end


This discussion is preserved as it was. New answers, comments, and votes are closed.