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

How do I code a team assign script?

Asked by 9 years ago

So I've looked through wikis and forums and asked people on the "Scripter" sections of the forums. But they were rude and gave no help at all. So I had to keep looking and found this. I was wondering how do I script a simple team assign script that assigns the players ingame into 2 teams. I understand it will use the mechanics of a for loop & functions with getchildren. But the problem for me is, I don't know how to make it so the script splits the player ammount into two teams. Can you help?

Right now I can't really think up of anyway on how to code it. But this is what i currently go until i go stuck with the team assign


--[LOAD]-- print("Starting Module..") print("Done!") --[Locals]-- local Intro = Game.StarterGui.Intro.Screen local TextBox = Game.StarterGui.Intro.Screen.TextBox --[GUI Loading]-- print("Loading Files Start!") Intro.Enabled = true wait(3) TextBox.Text = "Loading files." TextBox.Text = "Loading files.." TextBox.Text = "Loading files..." TextBox.Text = "Loading files." TextBox.Text = "Loading files.." TextBox.Text = "Loading files..." wait() TextBox.Text = "Done" wait() Intro.Enabled = false --[Game Messages]-- Instance.new("Hint", Workspace) Game.Workspace.Message.Text = "Starting Round..." Game.ServerStorage.Map1:Clone() Game.Map1:MakeJoints() Game.Worksapce.Message.Text = "Making teams.." --[TEAM ASSIGN ]-- < HELP HERE PLEASE --[Start!]-- Game.Workspace.Message.Text = "Gamemode: Team Deathmatch" wait(2) Game.Workspace.Message.Text = "You have 5 Minutes, Once you 're teleported the timer starts." wait(3) Game.Workspace.Message:Destroy() --[Teleport Teams]--
0
This script has so many errors, It will take like a day to fix... EzraNehemiah_TF2 3552 — 9y
0
Line 29, Should be "local NAMEOFVARIABLEHERE=Instance.new("Hint", Workspace) woodengop 1134 — 9y

Answer this question